Skip to content

Instantly share code, notes, and snippets.

View pushcx's full-sized avatar

Peter Bhat Harkins pushcx

View GitHub Profile
@pushcx
pushcx / .vimrc
Created March 1, 2013 14:51
My config file
" preliminaries {{{
" vim: foldmethod=marker
set nocompatible " real ultimate power
let mapleader=","
call pathogen#infect()
syntax on
filetype plugin indent on
[user]
name = Peter Harkins
email = ph@push.cx
[color]
ui = auto
[alias]
a = add
aa = add --all
ai = add --interactive
ap = add --patch
defutf8 on
startup_message off
nethack off
deflogin off
vbell_msg " bell in %n"
autodetach on
multiuser on
shell -$SHELL
defscrollback 10000
@pushcx
pushcx / gist:5535312
Created May 7, 2013 19:15
command to convert pdf into tiffs
mkdir pages
gs -sDEVICE=pnggray -sOutputFile=pages/p%05d.png -r600 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dBATCH -dNOPAUSE -dSAFER -f filename.pdf -c quit
-sDEVICE is formatting, load ghostscript and run 'devicenames ==' to print the full list. 'tiffgray' for tiff
-sOutputFile is filename, can have paths, basic printf formatting for page number
-r is resolution, 150 is human reading, 300 is ocr/print, 600 is art printing
Don't need to edit later parameters except 'filename.pdf'
-AlphaBits are antialiasing, rest just gets it running on all pages non-interactively
id | name | convert_from
--------+------------------------------------------------+-----------------------------------------------
173111 | História | História
172431 | fantasía | fantasía
164181 | Niterói | Niterói
164171 | D&D Niterói DAEMON niteroi Dungeons & Dragons | D&D Niterói DAEMON niteroi Dungeons & Dragons
163331 | Máscara | Máscara
(5 rows)
# an interative animation queue for Crafty
Crafty.c "AnimationQueue",
init: ->
@requires("Tween")
@step_done_callback = undefined
# animations should be an array of hashes with the keys
# tween: a hash that gets passed to tween()
# frames: number of frames, passed to tween()
# callback: optional, a callback to run after this step completes
@pushcx
pushcx / intro
Created October 9, 2013 01:43
Intro to Git Workshop for Chicago Web Professionals 2013-10-08
Intro to Git
------------
Peter Harkins @pushcx http://push.cx
These notes will be available at http://gist.github.com/pushcx/ .... (TBD end
of prez)
If you haven't yet installed Git and want to follow along the exercise, visit:
http://git-scm.com/downloads
The WiFi network is named "BooCoo" and the password is "blackcoffee"

Immutable Ruby

Libraries I talked about

  • ice_nine: Deep freeze ruby objects
  • Values: Simple immutable value objects for ruby
  • immutable_attributes: specify attributes within an ActiveRecord model that can be set but not modified
  • hamster: Efficient, Immutable, Thread-Safe Collection classes for Ruby

Next Steps

/*
Closures as Family
Hi, I'm Peter Harkins - @pushcx
notes will be online at http://gist.github.com/pushcx
*/
function mom() {
@pushcx
pushcx / lwd-git.md
Last active August 29, 2015 14:05
Introduction to Version Control and Git to Lakefront Web Developers