This file contains hidden or 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
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
This file contains hidden or 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
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" Load plugins | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() |
This file contains hidden or 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
const http = require('http'); | |
const url = require('url'); | |
http.createServer(onRequest).listen(3000); | |
function onRequest (req, res) { | |
console.log('serving: ' + req.url); | |
const u = url.parse(req.url); |
This file contains hidden or 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
var hash = { prop_a: "abc", prop_b: "def", prop_c: "ghi" }; | |
function getMatches (string, regex) { | |
var match; | |
while (match = regex.exec(string)) { | |
var prop = match[1]; | |
string = string.slice(0, match.index) + hash[prop] + string.slice(match.index + prop.length + 4); | |
} | |
output = string; | |
} |
This file contains hidden or 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
var Node = function (value) { | |
this.value = value; | |
this.left = null; | |
this.right = null; | |
}; | |
var BinarySearchTree = function() { | |
this._root = null; | |
}; |
This file contains hidden or 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
var csvDownload = function (payload) { | |
var header = '"f1-value", "f2-value", "f3-value", "f4-value"\r\n', | |
link = document.createElement('a'), | |
csv; | |
payload.forEach(function(doc) { | |
data += '"' + doc.f1 + '",'; | |
data += '"' + doc.f2 + '",'; | |
data += '"' + doc.f3 + '",'; | |
data += '"' + doc.f4 + '"\r\n'; |