Skip to content

Instantly share code, notes, and snippets.

💭
shhhhhh

Joe McCann joemccann

💭
shhhhhh
  • Microsoft
  • San Francisco, CA
Block or report user

Report or block joemccann

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View script.js
var camera, scene, renderer,
geometry, material, mesh;
init();
animate();
function init() {
stats = new Stats();
stats.setMode(0);
stats.domElement.style.position = 'absolute';
View now-poller.js
const tiny = require('tiny-json-http')
const schedule = require('node-schedule')
const {
error,
log
} = console
function main() {
View gist:b41c834a021176cbae77a928876aa1f1
#!/bin/bash
# Set variables
# -----------------------------------
GUNBOT_GITHUB_FOLDER_NAME="Gunbot6.0.2"
GUNBOT_GITHUB_FILE_NAME="GUNBOT_v6.0.2_Poloniex_Bittrex_Patch"
# Set functions
# -----------------------------------
View aws-api-gateway-slack-conversion.json
## convert HTML POST data or HTTP GET query string to JSON
## get the raw post data from the AWS built-in variable and give it a nicer name
#if ($context.httpMethod == "POST")
#set($rawAPIData = $input.path('$'))
#elseif ($context.httpMethod == "GET")
#set($rawAPIData = $input.params().querystring)
#set($rawAPIData = $rawAPIData.toString())
#set($rawAPIDataLength = $rawAPIData.length() - 1)
#set($rawAPIData = $rawAPIData.substring(1, $rawAPIDataLength))
View gist:e75a56a2442739de6c0d
PLAY [nship] ******************************************************************
GATHERING FACTS ***************************************************************
<127.0.0.1> ESTABLISH CONNECTION FOR USER: joemccann
<127.0.0.1> REMOTE_MODULE setup
<127.0.0.1> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/Users/joemccann/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'StrictHostKeyChecking=no', '-o', 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', '127.0.0.1', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1425681970.52-168315940879894 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1425681970.52-168315940879894 && echo $HOME/.ansible/tmp/ansible-tmp-1425681970.52-168315940879894'"]
fatal: [joe-mac-air] => SSH encountered an unknown error. The output was:
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1:
@joemccann
joemccann / offline-static.md
Created Jan 24, 2014
Mother Ski Trip Offline Site
View offline-static.md

Every year at Mother we have an all-agency ski trip.

This year, we want a responsive site that will work on phones while people are on the slopes. The cell phone coverage there is shit so offline is necessary.

We basically need a schedule of events, phone numbers, etc. Nothing serious and nothing super interactive.

However, we are considering a leaderboard of sorts for some activities, but not a dealbreaker if data is eventually consistent.

Nonetheless, background syncing of sorts and adding to home page is a requirement.

@joemccann
joemccann / short-yen-long-nikkei.md
Last active Jan 1, 2016
Explaining Short Yen/Long Nikkei Pair Trade.
View short-yen-long-nikkei.md

Recently, I tweeted the following:

Short Yen/Long Nikkei pair trade worked all year; up 57% for 2013. Will continue into 2014 me thinks. http://t.co/llhIzUwHza

— Joe McCann (@joemccann) December 31, 2013
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

And my friend Laurie Voss, @seldo, asked a completely legitmate question:

@joemccann How do you go long the Nikkei without getting clobbered by the fall of the Yen? (I am a noob)

— Laurie Voss (@seldo) December 31, 2013
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
@joemccann
joemccann / jct-at-mother.md
Created Dec 17, 2013
Junior Creative Technologist Job At Mother New York
View jct-at-mother.md

Job Opportunity at Mother NY

##Junior Creative Technologist

Mother New York is a creatively-driven agency in New York City. We exist to attract the most creative minds in the world, including our clients. Our client list includes Burger King, Tanqueray, Stella Artois, Virgin Mobile, Sour Patch Kids, Target, Microsoft and other world-class brands.

We are looking for an individual that can help us ….

Position: Permanent

View nginx-load-balance-config.sh
upstream lb-subprint {
ip_hash;
server 192.241.180.249:3222 weight=10 max_fails=3 fail_timeout=30s; # Reverse proxy to machine-1
server 192.241.241.152:3222 weight=10 max_fails=3 fail_timeout=30s; # Reverse proxy to machine-2
}
server {
listen 80;
server_name www.subprint.com subprint.com;
View gist:6218068
rompt: Is this ok?: (yes)
info: Creating snapshot 0.0.1-4
info Uploading: [=============================] 100%
info: Updating app geogram
info: Activating snapshot 0.0.1-4 for geogram
info: Starting app geogram
error: No free servers available. Please visit #nodejitsu on irc.freenode.net or email support@nodejitsu.com for further information.
help: For help with this error contact Nodejitsu Support:
help: webchat: <http://webchat.nodejitsu.com/>
help: irc: <irc://chat.freenode.net/#nodejitsu>
You can’t perform that action at this time.