Skip to content

Instantly share code, notes, and snippets.

View nclark's full-sized avatar
💭
wu tang is for the children

Neal Clark nclark

💭
wu tang is for the children
View GitHub Profile
@nclark
nclark / .zshrc
Created March 3, 2011 07:57
zsh and .rvmrc (for screen)
if [[ ( -a .rvmrc ) && $TERM == 'screen' ]]; then
source .rvmrc
fi
@nclark
nclark / end.scpt
Created May 21, 2011 03:36
applescripts for pomodoro.app
tell application "Finder"
if (name of every application process) contains "Skype" then
tell application "Skype"
send command "SET USERSTATUS ONLINE" script name "pomodoro"
send command "SET PROFILE MOOD_TEXT " script name "pomodoro"
end tell
end if
end tell
tell application "Twitter" to activate
@nclark
nclark / .custom_screenrc
Created July 22, 2011 20:03
start a screen with stuff already running
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %m/%d %C%a "
termcapinfo xterm* ti@:te@
startup_message off
vbell off
screen -t irb 1 irb
screen -t vi 2 vi
@nclark
nclark / ultemplate.rb
Created October 24, 2011 21:06 — forked from Lytol/ultemplate.rb
Rails 3 Application Template
# Rails application template for Rails 3 + Postgres + Git + haml + JQuery + Rspec + Cucumber + Capybara + FactoryGirl
# by Brian Smith <bsmith@swig505.com>
# Create a default README
file "README.md", <<-EOF
#{app_name}
#{"=" * app_name.length}
TODO: description
@nclark
nclark / .osx
Created December 18, 2011 20:04 — forked from dennmart/.osx
Sensible defaults for Mac OS X Lion
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Enable the 2D Dock
defaults write com.apple.dock no-glass -bool true
# Make Dock icons of hidden applications translucent
defaults write com.apple.dock showhidden -bool true
# Disable menu bar transparency
--- pjax.orig.rb 2012-05-04 22:46:22.000000000 -0700
+++ pjax.rb 2012-05-04 22:46:57.000000000 -0700
@@ -13,6 +13,10 @@
headers = HeaderHash.new(headers)
if pjax?(env)
+ request_parameters = env['action_dispatch.request.parameters']
+ controller_name = request_parameters[:controller]
+ action_name = request_parameters['action']
+
@nclark
nclark / run
Created May 18, 2012 22:01 — forked from riywo/run
unicorn with daemontools
#!/bin/bash
# mkdir /service/redmine-unicorn
# cd /service/redmine-unicorn
# mkdir env
# echo "production" > env/RAILS_ENV
# echo "/home/riywo/redmine" > env/RAILS_ROOT
# echo "/home/riywo/.rbenv" > env/RBENV_ROOT
# echo "riywo" > env/USER
exec 2>&1 \

Here's what you get.

Some CoffeeScript (verbosely commented for clarity)

# Override Rails handling of confirmation

$.rails.allowAction = (element) ->
  # The message is something like "Are you sure?"
  message = element.data('confirm')

Keybase proof

I hereby claim:

  • I am nclark on github.
  • I am nclark (https://keybase.io/nclark) on keybase.
  • I have a public key whose fingerprint is EAB5 1E08 38D8 000F 0267 B21D A118 BC05 B671 610A

To claim this, I am signing this object:

# root and users in group wheel can run anything on any machine as any user
root ALL = (ALL) ALL
%admin ALL = (ALL) ALL
nclark ALL = (ALL) ALL, NOPASSWD: /usr/local/bin/svc,/usr/local/bin/svstat