Skip to content

Instantly share code, notes, and snippets.

View ryanlindsey's full-sized avatar
🏠
Working from home

Ryan Lindsey ryanlindsey

🏠
Working from home
  • California
View GitHub Profile
@ryanlindsey
ryanlindsey / git_plugin.md
Created October 14, 2015 23:55
Git plugin shortcuts for Oh My ZSH
Alias Command
g git
ga git add
gaa git add --all
gapa git add --patch
gb git branch

Keybase proof

I hereby claim:

  • I am pixelsonly on github.
  • I am pixelsonly (https://keybase.io/pixelsonly) on keybase.
  • I have a public key ASC8GT7i_CgGt9AKk3yVyPwiJrLukjC8p4ZyX67IIkvdDQo

To claim this, I am signing this object:

@ryanlindsey
ryanlindsey / zip_example.sh
Created April 11, 2019 01:16
Archiving a folder in macOS on the command line
$ zip -X -r my_archive.zip my_folder/

Backup and sync Atom settings!

###
# Required Gems
###
###
# Settings
###
set :site_title, "Site name"
@ryanlindsey
ryanlindsey / pgbackup.sh
Created January 3, 2014 19:34
Import Heroku Postgres to Localhost
$ heroku pgbackups:capture
$ curl -o latest.dump `heroku pgbackups:url`
$ pg_restore --verbose --clean --no-acl --no-owner -h localhost -U MyUser -d MyDB latest.dump
@ryanlindsey
ryanlindsey / gem_cleaning.sh
Created November 12, 2013 17:58
gem cleaning
# dry run first
$ gem cleanup your_gem_name -d
$ gem cleanup your_gem_name -v
@ryanlindsey
ryanlindsey / osx_dock_spacer.sh
Created October 6, 2013 20:24
Easily add spacers to your OSX Dock with this terminal command
$ defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'
$ killall Dock
@ryanlindsey
ryanlindsey / power_settings
Created August 10, 2013 18:27
OSX 10.8 Power Settings
sudo pmset hibernatemode 0
sudo pmset standby 0
sudo pmset autopoweroff 0
@ryanlindsey
ryanlindsey / app_controller.rb
Created May 30, 2013 21:26
An example Rails 3.2 controller that sets the CORS access control headers for cross-domain access
class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :cors_preflight_check
after_filter :cors_set_access_control_headers
# For all responses in this controller, return the CORS access control headers.
def cors_set_access_control_headers
headers['Access-Control-Allow-Origin'] = '*'