This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Select all and delete (actually move to buffer) | |
:%d | |
Exit | |
:x | |
Paste | |
CTRL + Insert | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
with open("yourfile.ext", "rb") as image_file: | |
encoded_string = base64.b64encode(image_file.read()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
event: { | |
"name": "event_test", | |
"properties": { | |
"color": "red", | |
"size": "medium", | |
"texture": "flannel" | |
} | |
} | |
},{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"indent_size": 4, | |
"indent_char": " ", | |
"indent_level": 0, | |
"indent_with_tabs": false, | |
"preserve_newlines": true, | |
"max_preserve_newlines": 10, | |
"jslint_happy": false, | |
"brace_style": "collapse", | |
"keep_array_indentation": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// an array of options to pass to jslint. | |
"options" : [ | |
// examples using predef flag. | |
"--predef", "['angular', 'document', '\\$', '_', 'jQuery', 'FB', 'window', 'Bootstrapper']" | |
// tolerate missing 'use strict' pragma. | |
,"--sloppy" | |
// suggest an indent level of two spaces. | |
,"--indent", "4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// credit goes to this stack overflow post - http://stackoverflow.com/questions/20646836/is-there-any-way-to-import-a-json-filecontains-100-documents-in-elasticsearch | |
var elasticsearch = require('elasticsearch'), | |
fs = require('fs'), | |
pubs = JSON.parse(fs.readFileSync(__dirname + '/pubs.json')), // name of my first file to parse | |
forms = JSON.parse(fs.readFileSync(__dirname + '/forms.json')); // and the second set | |
var client = new elasticsearch.Client({ // default is fine for me, change as you see fit | |
host: 'localhost:9200', | |
log: 'trace' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
!function (t) { | |
function e(t) { | |
var e, r = null, | |
n = []; | |
for (e = 0; e < t.length; ++e) !r || r[1] < t[e][0] ? (r && n.push(r), r = [t[e][0], t[e][1]]) : t[e][1] > r[1] && (r[1] = t[e][1]); | |
return r && n.push(r), n | |
} | |
function r(t) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*globals Analytics, Browser, SpreadsheetApp */ | |
var analyticsManagement = Analytics.Management; | |
var accounts = analyticsManagement.Accounts; | |
var properties = analyticsManagement.Webproperties; | |
var profiles = analyticsManagement.Profiles; | |
var filters = analyticsManagement.Filters; | |
var viewFilters = analyticsManagement.ProfileFilterLinks; | |
var goals = analyticsManagement.Goals; |