Generated by Elite: Dangerous Rare Trade Route Generator v1.0.0 at 2014-12-27 15:10:33 -0500 using data from ED_RareGoods_SystemsDistance (26/12/14 - rev 1358).
- Suboptimal sell distance: Eranin -> Any Na (154.11 Ly)
var githubOAuth = require('github-oauth')({ | |
githubClient: process.env['GITHUB_CLIENT'], | |
githubSecret: process.env['GITHUB_SECRET'], | |
baseURL: 'http://localhost:9001', | |
loginURI: '/login', | |
callbackURI: '/callback', | |
scope: 'user', | |
}); | |
require('http').createServer(function(req, res) { |
// This is an UBER simplified example, but I hope you get the idea... | |
function thisIsHowWeWriteSyncCode(arg) { | |
var foo = doSomething(arg); | |
var bar = doSomethingElse(foo); | |
var baz = doSomethingWith("test", bar, 123); | |
return doLastThing(baz); | |
} | |
function soThisSeemsSensibleForAsyncCode(arg) { |
// Today, I noticed that someone favorited this tweet of mine from 2012: | |
// https://twitter.com/cowboy/status/232587756486938624 | |
// !function $(){console.log('!'+$+'()')}() #quine | |
// So I fooled around for a little bit: | |
// Shortest JavaScript quine? | |
(function _(){return'('+_+')()'})() | |
// Have fun with this one! |
// You can have multiple optional arguments, but only if the arguments | |
// can be distinguished from one another (in this example, by type) | |
function optionalUnambiguous(myString, myNumber) { | |
if (typeof myString === 'number') { | |
myNumber = myString; | |
myString = null; | |
} | |
if (myString == null) { myString = 'default'; } | |
if (myNumber == null) { myNumber = 0; } |
// Why use an explicit variable... | |
function lame() { | |
var args = arguments; | |
return function(fn) { | |
console.group.apply(console, args); | |
fn(); | |
console.groupEnd(); | |
}; | |
} |
Generated by Elite: Dangerous Rare Trade Route Generator v1.0.0 at 2014-12-27 15:10:33 -0500 using data from ED_RareGoods_SystemsDistance (26/12/14 - rev 1358).
/ | |
.7 | |
\ , // | |
|\.--._/|// | |
/\ ) ) ).'/ | |
/( \ // / | |
/( J`((_/ \ | |
/ ) | _\ / | |
/|) \ eJ L |
; =================================================== | |
; Poll system for known active windows | |
; "Cowboy" Ben Alman - 2014 | |
; https://gist.github.com/cowboy/77642d25ef49559d574f | |
; =================================================== | |
#Persistent | |
#SingleInstance Force | |
; Exe windows to poll for. |
foo bar | |
baz | |
qux | |
last line (there may or may not be a trailing newline after this line) |
; Press quickly to send <key1>, hold for <delay> ms to send <key2> | |
; Examples: | |
; Joy8::dualPress("[", "]") | |
; Joy10::dualPress("N", "{RShift Down}{N}{RShift Up}") | |
; MButton::dualPress("F12", "F11", 0.5) | |
dualPress(key1, key2, delay = 0.2) { | |
IfNotInString, key1, { | |
key1 = {%key1%} | |
IfNotInString, key2, { |