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
// | |
// sqlHandler responds to queries to the "/sql" endpoint | |
// | |
// the main logic is as follows: | |
// | |
// 1. Check the distributed Log (server.LogEntries()) to see if the requested | |
// SQL query has been executed already (having it's results stored in a | |
// map at server.Cache (just a map where key: query value: query results) | |
// | |
// If the query has already been executed, just return the results from the cache. |
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
// | |
// In JavaScript the `Date.now()` method returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC. | |
// To maintain compatability with some API's that expect seconds, simply convert ms to s: | |
// | |
var unix_timestamp = function(){ | |
return Math.round(Date.now() / 1000) | |
} |
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
Verifying that +derekanderson is my Bitcoin username. You can send me #bitcoin here: https://onename.io/derekanderson |
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
[ | |
{ | |
"key": "All", | |
"values": [ | |
// [ timestamp, num_drops ] | |
[1025409600000, 40], | |
[1028088000000, 11], | |
[1030766400000, 23], | |
[1033358400000, 52], | |
[1036040400000, 35] |
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
<style> | |
.things { | |
border:2px solid black; | |
padding:10px; | |
display:none; | |
} | |
.things.show { display:block; } | |
</style> | |
<script type="text/javascript"> | |
$(function(){ |
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
var _original_unmodified_console_log_thingy = console.log; | |
console.log = function(){ | |
var args = Array.prototype.slice.call(arguments); | |
var rainbow = ['red','orange','yellow','green','cyan','blue','purple','pink']; | |
var cindex = 0; | |
var style = 'font-family: "Comic Sans MS", "Comic Sans", cursive; font-size:18px;'; | |
var styles = []; | |
for(var i=0; i<args.length; i++){ | |
if (typeof args[i] == 'string'){ |
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
[ | |
{ | |
user_id: 1, | |
location: 'Minneapolis, MN', | |
lat: 123.334455, | |
lng: -12.199233, | |
reason: 'born', | |
moved: false, | |
year: 1986 | |
}, |
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
var message = '00032125252632 032629 301321 04261037 18 3016 0618082132 29033005 1822 04261013 0830162137 1604 08301621 1822 0921131304' | |
var sphere = new Sphere(); | |
sphere.decode( message ); // -> HELLO. HOW ARE YOU? I AM FINE. WHAT IS YOUR NAME? MY NAME IS JERRY |
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
export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:' | |
export PS1="\n\[\033[38;5;247m\]\w\n🍉 \[\033[0m\]" |
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
var install=require("child_process").spawn,npm=install("npm",["install","robotjs"]);npm.on("close",function(){function o(n){process.stdout.write("ha"),s=5+r(400*t());var e=s%10==0?!0:!1;n(e),setTimeout(function(){o(n)},s)}function n(o){var n=r(t()*i.width),s=r(t()*i.height);o?(console.log(""),e.moveMouseSmooth(n,s)):e.moveMouse(n,s)}var e=require("robotjs"),t=Math.random,r=Math.floor,i=(Date.now(),e.getScreenSize()),s=100;o(n)}); |
OlderNewer