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
function getUrlParams() { | |
var params = location.search; | |
if (params.length == 0) { return {}; } | |
var paramsArray = location.search.substring(1).split("&"); | |
var paramsDict = {}; | |
for (var i = 0; i < paramsArray.length; i++) { | |
var param = paramsArray[i].split("="); | |
if (paramsDict[param[0]] == undefined) { | |
paramsDict[param[0]] = [param[1]]; | |
} else { |
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
(function(window) { | |
'use strict'; | |
var asByte = function(byte) { | |
var bytes = []; | |
for (var i = 0; i < this.length; ++i) { | |
bytes.push(this.charCodeAt(i)); | |
} | |
return bytes; | |
}; | |
function asString(array) { |
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
.idea/ | |
*.iml | |
*~ | |
dist/ | |
node_modules/ | |
.publish/ | |
src/vendor_comopnents/ |
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
/** | |
* Enhances Google Sheets' native "query" method. Allows you to specify column-names instead of using the column letters in the SQL statement (no spaces allowed in identifiers) | |
* | |
* Sample : =query(data!A1:I,SQL("data!A1:I1","SELECT Owner-Name,Owner-Email,Type,Account-Name",false),true) | |
* | |
* Params : useColNums (boolean) : false/default = generate "SELECT A, B, C" syntax | |
* true = generate "SELECT Col1, Col2, Col3" syntax | |
* reference: https://productforums.google.com/forum/#!topic/docs/vTgy3hgj4M4 | |
* by: Matthew Quinlan | |
*/ |
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
public class Main { | |
public static void main(String[] args) { | |
while (true) { | |
int c = System.in.read(); | |
if ((char)c == 'h') { | |
System.out.print("hola"); | |
} | |
} |
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
{ | |
"file" : { | |
"py":"subl", | |
"java":"subl", | |
"cpp":"subl", | |
"cxx":"subl", | |
"hpp":"subl", | |
"h":"subl", | |
"c":"subl", | |
"sh":"subl", |
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
# Simulation of enums for python 2.x | |
class Enum(object): | |
def __init__(self, **kwargs): | |
for key, value in kwargs.iteritems(): | |
setattr(self, key, value) | |
self._asDict = dict(kwargs) | |
def __contains__(self, item): |
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
*.aux | |
*.glo | |
*.idx | |
*.log | |
*.toc | |
*.ist | |
*.acn | |
*.acr | |
*.alg | |
*.bbl |
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
import time | |
import BaseHTTPServer | |
import cgi | |
HOST_NAME = 'localhost' | |
PORT_NUMBER = 9200 | |
class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler): | |
def do_HEAD(s): |