Skip to content

Instantly share code, notes, and snippets.

View chadfennell's full-sized avatar

Chad M Fennell chadfennell

View GitHub Profile
set nocompatible
set number
set ruler
syntax on
" Set encoding
set encoding=utf-8
" Whitespace stuff
" CTags
map <Leader>rt :!ctags --extra=+f -R *<CR><CR>
map <C-\> :tnext<CR>
let Tlist_Ctags_Cmd = '/usr/local/Cellar/ctags/5.8/bin/ctags'
--type-set=drupal=.module,.info,.inc,.php,.js
MODULE main
VAR
NS_Sensor : boolean;
EW_Sensor : boolean;
Light_Prev_State : {NS, EW};
Light_State : {NS_Green, EW_Green};
ASSIGN
@chadfennell
chadfennell / gist:5978955
Created July 11, 2013 20:29
dapistrano development.rb
# The Repository for the drush make file
set :repository, "git@github.com:usernamehere/yourapp_make.git"
# Establishes the source code management system is git
set :scm, :git
set :scm_verbose, true
# Add arguments to the make build process. Here we ensure that .git directories
# from each project repository are preserved (useful on your dev instance)
set :make_args, '--working-copy'
@chadfennell
chadfennell / gist:d0246431bae9450029b0
Created February 6, 2015 16:17
Example Extractor Section
{
"extractor": {
"records": {
"base_url": "http://hub-services.lib.umn.edu/api/v1/extract",
"endpoint_type": "simple_get",
"api_key": "<<<<key here>>>>",
"origin_path": "OAI_PMH/ListRecords/record",
"batch_param_name": "resumptionToken",
"batch_param_path": "OAI_PMH/ListRecords/resumptionToken",
"batch_endpoint": "http://collections.carli.illinois.edu/cgi-bin/oai.exe?verb=ListRecords",
@chadfennell
chadfennell / template.rb
Last active August 29, 2015 14:15
Application Template v0.1
gem_group :development do
# Debug seems to have trouble w/ Ruby 2.x, byebug is a replacment
gem 'byebug'
gem 'better_errors'
gem 'binding_of_caller'
gem 'meta_request'
gem 'capistrano', '~> 3.2.0'
gem 'capistrano-rails'
gem 'capistrano-bundler'
gem 'capistrano-rvm'
require 'googleauth'
require 'google/apis/analytics_v3'
# /via https://github.com/google/google-api-ruby-client/issues/291
class GoogleAnalytics
def self.client
service = new
service.analytics_service
end
http://api.dp.la/v2/items?api_key=[DPLA API KEY HERE]&page_size=500&q=%2213th+Amendment%22+OR+%22Aaron+Douglas%22+OR+%22abolition%22+OR+%22Affirmative+Action%22+OR+%22African+Americans%22+OR+%22African+American%22+OR+%22Afro-American%22+OR+%22Alaine+Locke%22+OR+%22Aldridge+Ira%22+OR+%22Alexander+Elizabeth%22+OR+%22Alvin+Ailey%22+OR+%22Amiri+Baraka%22+OR+%22Ann+Petry%22+OR+%22Aretha+Franklin%22+OR+%22August+Wilson%22+OR+%22B.+B.+King%22+OR+%22bell+hooks%22+OR+%22Bessie+Smith%22+OR+%22Beyonce%22+OR+%22Big+Mama+Thornton%22+OR+%22Billie+Holiday%22+OR+%22black+activist%22+OR+%22black+aesthetic%22+OR+%22black+art%22+OR+%22Black+Arts+Movement%22+OR+%22black+athlete%22+OR+%22black+author%22+OR+%22black+band%22+OR+%22black+boy%22+OR+%22black+child%22+OR+%22black+children%22+OR+%22Uncle+Tom%E2%80%99s+Cabin%22+OR+%22black+college%22+OR+%22Prisoner+of+Second+Avenue%22+OR+%22black+community%22+OR+%22black+consciousness%22+OR+%22black+culture%22+OR+%22black+dance%22+OR+%22Black+Freedom%22+OR+%22black+girl%22+OR+%22black+Ha
class ChessCell
attr_reader :row, :column, :coordinates
def initialize(coordinates)
@row, @column = coordinates
@coordinates = coordinates
end
end
class Queen
attr_reader :attackable, :cell