This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
mkdir -p $HOME/Library/LaunchAgents | |
dir="$HOME/Library/Watchpics" | |
beep="/System/Library/PrivateFrameworks/ScreenReader.framework/Versions/A/Resources/Sounds/Ellipsis.aiff" | |
cat > $HOME/Library/LaunchAgents/watchpics.plist <<EOF | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Disabled</key> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Warden::Manager.serialize_into_session{|user| user.id } | |
Warden::Manager.serialize_from_session{|id| User.get(id) } | |
Warden::Manager.before_failure do |env,opts| | |
# Sinatra is very sensitive to the request method | |
# since authentication could fail on any type of method, we need | |
# to set it for the failure app so it is routed to the correct block | |
env['REQUEST_METHOD'] = "POST" | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LoadModule passenger_module <your-passenger-root-path>/ext/apache2/mod_passenger.so | |
PassengerRoot <your-passenger-root-path> | |
PassengerUseGlobalQueue on | |
PassengerMaxPoolSize 16 | |
PassengerPoolIdleTime 0 | |
PassengerMaxRequests 1000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.14 | |
PassengerRuby /usr/bin/ruby | |
PassengerLogLevel 0 | |
PassengerUseGlobalQueue On | |
PassengerUserSwitching On | |
PassengerDefaultUser rails | |
PassengerMaxPoolSize 30 | |
PassengerMaxInstancesPerApp 0 | |
PassengerPoolIdleTime 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
%w{rubygems hmac-sha1 base64 cgi net/https uri openssl}.each{ |f| require f } | |
KEY = '<YOUR KEY>'; | |
SECRET = '<YOUR SECRET>'; | |
# encodes strings that make twitter oauth happy | |
def encode( string ) | |
URI.escape( string, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]") ).gsub('*', '%2A') | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" I used to run call system('find ~/.vimbackup -mtime +14 -exec gvfs-trash "{}" \;') | |
" but now have created a more portable version since I work on Windows, Mac, & Linux. | |
set backup | |
set nowritebackup | |
set backupcopy=yes | |
set backupdir=$HOME/.vimbackup | |
set directory=$HOME/.vimswap,./ | |
" Timestamp the backups |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function flask-boilerplate-tmux | |
{ | |
# https://github.com/swaroopch/flask-boilerplate | |
BASE="$HOME/code/flask-boilerplate" | |
cd $BASE | |
tmux start-server | |
tmux new-session -d -s flaskboilerplate -n model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "colored" | |
require "rails" | |
require "haml" | |
require "bundler" | |
@partials = "#{File.dirname(__FILE__)}" | |
puts "\n=========================================================" | |
puts " FISCHER'S RAILS 3 TEMPLATE".yellow.bold | |
puts "=========================================================\n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ybookmarks.sqlite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Libraries::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
require 'rubygems' | |
require 'sinatra/base' | |
require 'slim' | |
require 'sass' | |
require 'coffee-script' | |
# Application::::::::::::::::::::::::::::::::::::::::::::::::::: |
OlderNewer