Skip to content

Instantly share code, notes, and snippets.


Evan Moran evanmoran

View GitHub Profile


Markdown is written in plain text but generates HTML. Links and formatting can be placed inline, as can code blocks.


evanmoran / node-download
Created Oct 14, 2013
Download file with Node
View node-download
// download: download the url to string = function(url, cb){
var options = require('url').parse(url),
httpx = url.startsWith(url, 'https:') ? https : http,
data = "",
req = httpx.request(options, function(res){
res.on("data", function(chunk){
return data += chunk;
evanmoran / fast-gh-pages
Last active Dec 12, 2015
Create github pages in a natural way by making gh-pages a submodule of master
View fast-gh-pages
# Create gh-pages branch
git checkout --orphan gh-pages
# Remove all files from the old working tree
git clean -fdx
# Create initial index.html file
echo "My github page" > index.html
# Turn off jekyll
evanmoran / bash_terminal_open_by_theme
Created Mar 20, 2012
Bash script to open new terminal windows / tabs by theme
View bash_terminal_open_by_theme
function terminal_open {
osascript -e 'tell application "Terminal" to activate' \
-e 'tell application "System Events"' \
-e 'tell process "Terminal"' \
-e "tell menu item \"${1}\" of menu \"New ${2}\" of menu item \"New ${2}\" of menu \"Shell\" of menu bar item \"Shell\" of menu bar 1" \
-e 'click' \
-e 'end tell' \
-e 'end tell' \
-e 'end tell' > /dev/null
View Goto Fail
static OSStatus
SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams,
uint8_t *signature, UInt16 signatureLen)
OSStatus err;
if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0)
goto fail;
if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
You can’t perform that action at this time.