Skip to content

Instantly share code, notes, and snippets.

View drydevelopment's full-sized avatar

Doug Yoder drydevelopment

View GitHub Profile
@drydevelopment
drydevelopment / naics-codes-2017.csv
Created July 23, 2020 19:29
NAICS Codes CSV (2017)
code title
111110 Soybean Farming
111120 Oilseed (except Soybean) Farming
111130 Dry Pea and Bean Farming
111140 Wheat Farming
111150 Corn Farming
111160 Rice Farming
111191 Oilseed and Grain Combination Farming
111199 All Other Grain Farming
111211 Potato Farming
@drydevelopment
drydevelopment / too_many_open_files.md
Last active January 17, 2019 19:21
Too many open files - macOS Workaround

Too many open files - macOS Workaround

  1. Creating a launchd Property List File

    Create a launchd property list file, and paste the followin snippet at /Library/LaunchDaemons/limit.maxfiles.plist.

    <?xml version="1.0" encoding="UTF-8"?>  
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"  
    	"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    
@drydevelopment
drydevelopment / iso_8601_timestamp.sql
Last active February 15, 2018 20:12
PostgreSQL function to output an ISO 8601 formatted timestamp with time zone
/* Tested on PostgreSQL 9.6 */
CREATE OR REPLACE FUNCTION iso_8601_timestamp(datetime TIMESTAMP WITH TIME ZONE)
RETURNS VARCHAR AS $$
BEGIN
RETURN to_char(datetime::TIMESTAMPTZ AT TIME ZONE 'UTC', 'YYYY-MM-DD"T"HH24:MI:SS"Z"');
END;
$$
LANGUAGE PLPGSQL;

Keybase proof

I hereby claim:

  • I am drydevelopment on github.
  • I am dyoder (https://keybase.io/dyoder) on keybase.
  • I have a public key whose fingerprint is 5E4A F507 C554 9FEF 68C4 0224 62D3 5EC7 847F E4C3

To claim this, I am signing this object:

@drydevelopment
drydevelopment / deploy.rb
Created February 6, 2015 21:49
CPU Crushing Fix: resque + resque-scheduler + capistrano-resque + newrelic
# The resque-scheduler process would not respond to `kill -s QUIT [pid]`, and
# after a long time diagnosing the problem I found that the source of the problem
# was Newrelic. YAY! Disabling newrelic
task :disable_newrelic do
set :bundle_cmd, "NEWRELIC_ENABLE=false #{bundle_cmd}"
end
before "resque:start", "disable_newrelic"
before "resque:scheduler:start", "disable_newrelic"
/**
* Override window.setInterval to auto-call the function argument
* and bypass the delay to keep tests snappy.
*/
window.setInterval = function(func, delay) {
func.call();
};
@drydevelopment
drydevelopment / jasmine-console.js
Created November 15, 2012 15:53
Jasmine Console Runner
jasmine.ConsoleReporter = function(showColors)
{
if (!showColors)
showColors = true
var ansi = {
green: '\033[32m',
red: '\033[31m',
yellow: '\033[33m',
module Within3
module Setup
module RVM
def self.install
puts "Installing RVM..."
exec "curl -s https://rvm.beginrescueend.com/install/rvm | bash"
puts "RVM installed!"
end
end
end
install_everything(){
install_homebrew
install_git
install_imagemagick
install_memcached
install_sphinx
install_rvm
# install_mysql # Install from http://dev.mysql.com/downloads/mysql/5.1.html
# install_passenger
install_big_red
@drydevelopment
drydevelopment / Spork No server is running
Created March 14, 2011 19:02
Spork No server is running
Using RSpec
Preloading Rails environment
Loading Spork.prefork block...
No server is running
Running specs locally:
Spork is ready and listening on 8989!