Skip to content

Instantly share code, notes, and snippets.

View mtheoryx's full-sized avatar
🐳
Making happy little clouds

David Poindexter mtheoryx

🐳
Making happy little clouds
View GitHub Profile
@pbjorklund
pbjorklund / avdi_vcr_screencast_transcription
Created January 20, 2012 10:18
Transcript of avdi's vcr screencast
http://avdi.org/devblog/2011/04/11/screencast-taping-api-interactions-with-vcr/
== What is it
Testing web apps. Modern web apps are more often then not interconnected and talking with at least one RESTful api. These can be social networking sites, url shorteners, payment gateways etc.
This presents an interesting problem when it comes to high level integration testing. There are a few different approaches to testing on this level.
* Live testing - Talking directly to external sources
Slow, makes continuous integration a pain
Dependant on the services, can be in maintenance mode
@mpapis
mpapis / gist:2142642
Created March 20, 2012 23:48 — forked from mtheoryx/gist:2142561
bash echo rvm current, reusable
rvm current | awk -F '[@-]' '{print $2"-"$3}'
@duvillierA
duvillierA / doc.md
Last active June 2, 2016 19:46
How to Migrate an Ember.js 1.8.1 stack to 1.10.0 with HTMLBars on Grunt

Breaking changes


Dependencies

Dependency Version New Version Package manager
ember 1.8.1 1.10.0 Bower
ember-resolver 0.1.11 0.1.12 Bower
ember-data 1.0.0-beta.12 1.0.0-beta.14.1 Bower
@wassname
wassname / natural-webpack.js
Created April 3, 2016 09:16
Importing natural into webpack (the node nlp toolkit)
/*
Importing natural into webpack (the node nlp toolkit)
This is just copy of natural's index.js with some exports commented out.
This way it works in webpack, however I haven't full tested it.
*/
exports.SoundEx = require('natural/lib/natural/phonetics/soundex');
exports.Metaphone = require('natural/lib/natural/phonetics/metaphone');
exports.DoubleMetaphone = require('natural/lib/natural/phonetics/double_metaphone');
@mtheoryx
mtheoryx / packages.txt
Created June 2, 2017 12:25
It's dependency managers all the way down.
How can I get jQuery?
Install it with Bower (a package manager)
How can I get Bower?
Install it with yarn (a package manager)
How can I get yarn?
Install it with npm (a package manager)
How can I get npm?
Install it with nvm (node version manager)
How can I get nvm?
Install it with Homebrew (a mac package manager)

Early Voting in Indianaapolis

Election Day: Tuesday, November 6th, 2018

7 Early Voting Locations in Indianapolis

Marion County Clerk's Office

Location

@jaredpsimpson
jaredpsimpson / hex.c
Created March 28, 2019 21:04
HEX to split RGB
// Get rid of '#' and convert it to integer
long int number = strtol(&command[0], NULL, 16);
// Split them up into r, g, b values
int red = number >> 16;
int green = number >> 8 & 0xFF;
int blue = number & 0xFF;
@mrpunkin
mrpunkin / arel_based.rb
Created March 7, 2012 21:47
Using arel to query SQL functions
dc = Arel::Nodes::NamedFunction.new "DATE", [ p[:created_at] ] ## second argument must be an array
## Sub this...
arel.project("DATE(`photos`.`created_at`)")
## For this...
arel.project(dc.to_sql)
arel.to_sql >> "SELECT DATE(`photos`.`created_at`) FROM `photos` INNER JOIN `votes` ON `photos`.`id` = `votes`.`photo_id`"
@siteshen
siteshen / slack_client.sh
Created January 17, 2015 04:54
Slack client in bash
#!/bin/bash
# https://your-team.slack.com/services/new/incoming-webhook
WEBHOOK_URL=''
CHANNEL='#dev'
USERNAME='sentry'
iCON_URL='https://slack.global.ssl.fastly.net/17635/img/services/sentry_128.png'
function post_message() {
payload="{'username': '$USERNAME', 'text': '$AT_USER $1', 'channel': '$CHANNEL', 'icon_url': '$ICON_URL'}"
@mjackson
mjackson / Dockerfile
Created October 13, 2017 00:30
Running `gatsby develop` on a container in development
FROM node:8
WORKDIR /home/node/app
ADD https://github.com/Yelp/dumb-init/releases/download/v1.1.1/dumb-init_1.1.1_amd64 /usr/local/bin/dumb-init
RUN chmod +x /usr/local/bin/dumb-init
COPY package.json yarn.lock ./
RUN yarn --pure-lockfile
COPY . .