Skip to content

Instantly share code, notes, and snippets.

View dkinzer's full-sized avatar

David Kinzer (he/him) dkinzer

View GitHub Profile
@dkinzer
dkinzer / remove-unused.sh
Last active August 29, 2015 14:03
Remove unused modules from repo.
#!/bin/bash
modules=( \
contemplate mollom nca_ahah panels \
pdf_to_imagefield apachesolr_sort scheduler \
uc_add_donation uc_ssl webform \
data schema wp_redirect suggestions ezproxy quicktabs \
taxonomy_access views_horizontal_slides colorbox)
for module in ${modules[@
@dkinzer
dkinzer / post-update
Created July 3, 2014 20:57
Git update hook example for executing deployment.
#!/bin/sh
set -e
GIT_CLONE=../jenkins/
echo '*************************'
echo '* PUSHING CHANGES *'
echo '*************************'
cd $GIT_CLONE/.git
git pull origin jenkins-7
@dkinzer
dkinzer / mysql_recipe_example.rb
Last active August 29, 2015 14:04
Is this sandwich method for temporarily assigning a msyql server configuration the way it's done?
template '/etc/mysql/conf.d/mysite.cnf' do
owner 'mysql'
owner 'mysql'
source 'mysite.cnf.erb'
variables :x => 'temporary',
notifies :restart, 'mysql_service[default]'
end
include_recipe 'do-big-import-once'
source "https://rubygems.org"
gem "knife-solo"
gem "knife-solo_data_bag"
gem "foodcritic"
gem "fog"
gem "berkshelf"
source "https://supermarket.getchef.com"
metadata
cookbook "apache2", :git => "https://github.com/onehealth-cookbooks/apache2.git"
cookbook "php", :git => "https://github.com/jenkinslaw/php.git", :branch => "master"
cookbook 'drush', :git => 'https://github.com/jenkinslaw/chef-drush.git', :branch => "master"
cookbook 'xhprof', :git => 'git://github.com/jenkinslaw/chef-xhprof.git'
#cookbook "deploy-drupal", :git => "https://github.com/jenkinslaw/chef-deploy-drupal.git", :branch
=> "master"
(define (subsets s)
(define (subset item)
(cons (car s) item))
(if (null? s)
(list nil)
(let ((rest (subsets (cdr s))))
(append rest (map subset rest)))))
(load "lib/assert")
(define roman-numerals (list (cons 1000 "M") (cons 900 "CM")
(cons 500 "D") (cons 400 "CD")
(cons 100 "C") (cons 90 "XC")
(cons 50 "L") (cons 40 "XL")
(cons 10 "X") (cons 9 "IX")
(cons 5 "V") (cons 4 "IV")
(cons 1 "I") (cons 0 "")))
(define (make-roman numeral)
@dkinzer
dkinzer / vagrant-verify.sh
Created September 8, 2014 17:40
Verify a Vagrant package.
[[ $(cat 1.6.5_SHA256SUMS | grep dmg$) == $(shasum -a 256 vagrant_1.6.5.dmg) ]] && echo "PASSED"
@dkinzer
dkinzer / credits.md
Last active August 29, 2015 14:06
Photo and Illustration Attribution for Presentation Slides...

Photo and Illustration Credits

  • ["Man Fig Miniature Wave Sit Rest Relax Friendly"][1], by Anja Osenberg, [CC0 1.0][cc-universal]
  • ["36100 Bangladesh Air Force MIG-29 Landing with the Drogue Parachute Deployed"][2], by Fisal Akram, [CC BY-SA 2.0][cc-sa-2]
  • ["Parachutist Skydiver Skydiving Sky Parachute"][3], by Lynn Greyling, [CC0 1.0][cc-universal]
  • ["Grow Blossom Time Lapse Sequence Amaryllis Flower"][4], by Stefan Schweihofer, [CC0 1.0][cc-universal]
  • ["Puzzle Cube Wood Block Toys Wooden Toys Build"][5], by Hans Braxmeier, [CC0 1.0][cc-universal]
  • ["Magic"][6], by Bart Cayusa, [CC BY-SA 2.0][cc-sa-2]
  • ["Simple Drupal Wallpaper"][7], by Matt Farina, [CC BY-SA 2.0][cc-sa-2]
@dkinzer
dkinzer / test.sh
Last active August 29, 2015 14:06
shellshock test on centos
cd /tmp; rm -f /tmp/echo; env 'x=() { (a)=>\' bash -c "echo date"; cat /tmp/echo
# date
# cat: /tmp/echo: No such file or directory