Skip to content

Instantly share code, notes, and snippets.

View chadmoone's full-sized avatar

Chad Moone chadmoone

View GitHub Profile
@chadmoone
chadmoone / recs.md
Last active June 20, 2016 17:52
Chad's 2016 WWDC Reccomendations

Chad's 2016 WWDC Talk Reccomendations

(Loosely in order of importance/value)

@chadmoone
chadmoone / install-pg.markdown
Last active August 29, 2015 13:56
Installing Postgresql

#Installing PostgreSQL#

##Drag-and-Drop Install##

  • Download Postgres.app
  • Drag to Applications folder and double-click

##Full-Beard Install##

  • Update homebrew:
@chadmoone
chadmoone / polymorphic-touch-bug.rb
Last active December 16, 2015 10:58
Rails master fails when polymorphic associations have touch: true (as of a489bfe48bc0fbbb50a472bc66bd42d408c73fcb)
unless File.exists?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'sqlite3'
GEMFILE
system 'bundle'
end
@chadmoone
chadmoone / tracer.rb
Last active December 16, 2015 08:49
ActiveSupport Concern to enable logging in technicolor.
module Tracer extend ActiveSupport::Concern
included do
unless (const_defined?(:TRACER_INIT))
# Prevent redefining constants when Rails reloads
TRACER_INIT = true;
# Formatting Options
CLEAR = "\e[0m"
BOLD = "\e[1m"
@chadmoone
chadmoone / post-commit
Created April 2, 2013 19:30
Default SVN post-commit hook
#!/bin/sh
# POST-COMMIT HOOK
#
# The post-commit hook is invoked after a commit. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-commit' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this repository)
Process: VEILS Builder [32697]
Path: /Applications/VEILS Builder.app/Contents/MacOS/VEILS Builder
Identifier: com.willinteractive.VEILS-Builder
Version: Beta 0.4.3 (0.4.3)
Code Type: X86-64 (Native)
Parent Process: launchd [312]
User ID: 501
Date/Time: 2013-03-05 13:31:11.655 -0500
OS Version: Mac OS X 10.8.2 (12C60)
@chadmoone
chadmoone / gist:4342286
Created December 20, 2012 01:30
This script works well for all fields in IE9, but does not work for password fields in IE8.
unless Modernizr.input.placeholder
# if password input have to clone it as a text input and then remove this later (otherwise it will show up as ******)
# add focus state to remove this input and show / focus the original
$("[placeholder]").focus(->
input = $(this)
if input.val() is input.attr("placeholder")
input.val ""
input.removeClass "placeholder"
<?xml version="1.0"?>
<!--Phoronix Test Suite v3.0.0a3 (Iveland) [ http://www.phoronix-test-suite.com/ ]-->
<PhoronixTestSuite>
<SuiteInformation>
<Title>Server Bench 2</Title>
<Version>1.0.0</Version>
<TestType>System</TestType>
<Description>A collection of general tests for a server environment.</Description>
<Maintainer>Chad Moone</Maintainer>
</SuiteInformation>
echo ""
echo "--Uninstalling pow..."
curl get.pow.cx/uninstall.sh | sh #if you have pow installed
echo ""
echo "--Modifying pow configuration..."
echo 'export POW_DST_PORT=88' >> ~/.powconfig
echo ""
echo "--Modifying Apache configuration..."
@chadmoone
chadmoone / mockupdata.xml
Created April 26, 2012 20:09
XML Example
<?xml version="1.0" encoding="UTF-8" ?>
<session>
<identifier>123456</identifier>
<dow>Thursday</dow>
<tod>Night</tod>
<injury>Blunt</injury>
<gcs>15</gcs>
<events>
<event>
<time>24:08:16</time>