Skip to content

Instantly share code, notes, and snippets.

View cbankston's full-sized avatar

Chris Bankston cbankston

View GitHub Profile
@cbankston
cbankston / coverage.rb
Last active July 21, 2017 19:50
Ruby code coverage config
# contents of spec/support/coverage.rb
require 'simplecov'
require 'simplecov-rcov'
SimpleCov.formatters = [
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::RcovFormatter
]
@cbankston
cbankston / benchmark.rb
Last active May 5, 2016 17:18
de-dupe algorithm benchmark for teammates
MAX = 10_000
def dedupe_alltogether(results)
results = []
results.each do |result|
results.push(result) unless results.include?(result)
end
end
@cbankston
cbankston / .env.service
Created February 23, 2016 20:08
Node Docker Project
RDS_HOSTNAME=db
RDS_USERNAME=root
RDS_PASSWORD=some_pass
NODE_PATH=/app
MESSAGE_SERVICE_USERNAME=guest
MESSAGE_SERVICE_PASSWORD=guest
MESSAGE_SERVICE_PORT=5672
MESSAGE_SERVICE_VHOST=/
MESSAGE_SERVICE_HOST=rabbit
@cbankston
cbankston / .env.web
Created February 23, 2016 20:03
Ruby Docker Project
RDS_HOSTNAME=db
RDS_USERNAME=root
RDS_PASSWORD=some_password
@cbankston
cbankston / watcher.js
Last active January 28, 2016 18:54
node mysql processlist
process.on('uncaughtException', function (err) {
console.error(err.stack);
process.exit(1);
})
var Promise = require("bluebird");
var knex = require('knex')({
client: 'mysql',
connection: {
@cbankston
cbankston / config _ rabbitmq.js
Created January 28, 2016 16:31
node/rabbit example
module.exports = function(rabbit, subscribeTo) {
return rabbit.configure({
connection: {
user: 'guest',
pass: 'guest',
server: [
process.env.RABBITMQ_HOSTNAME
],
port: 5672,
vhost: '%2f',
@cbankston
cbankston / _.module.js
Created January 27, 2016 15:50
angular pagination directive
(function() {
'use strict';
angular.module('blocks.pagination', []);
})();
set -g base-index 1
setw -g mode-mouse on
set -sg escape-time 0
setw -g xterm-keys on
# keybindings to make resizing easier
bind -n M-Left resize-pane -L