Skip to content

Instantly share code, notes, and snippets.

View bitgangsta's full-sized avatar

Daniel Jabbour bitgangsta

View GitHub Profile
@bitgangsta
bitgangsta / gitcheat.md
Created February 22, 2014 00:17
Some git things I want to remember

Tricks

Ignore local changes in tracked files

Ignore the changes of this file:

git update-index --assume-unchanged <file>

tmux shortcuts & cheatsheet

Note: This is customized for my own configuration. See my dotfiles repository for my tmux.conf (& local).

Windows (tabs)

c  new window
w  list windows
f  find window

, name window

class MyCustomCell < UITableViewCell
# This method is used by ProMotion to instantiate cells.
def initWithStyle(style_name, reuseIdentifier: reuseIdentifier)
super
stylish
self
end
# A delegate method when the user clicks the Row(it's blue by default)
file_cache_path "/tmp/chef-solo"
data_bag_path "/tmp/chef-solo/data_bags"
encrypted_data_bag_secret "/tmp/chef-solo/data_bag_key"
cookbook_path [ "/tmp/chef-solo/site-cookbooks",
"/tmp/chef-solo/cookbooks" ]
role_path "/tmp/chef-solo/roles"
@bitgangsta
bitgangsta / facebook_fluid.rb
Created June 20, 2012 02:22
Iterating over all schemas to update FB fluid property
SchemaHelper.with_schema(:clients) do
begin
app_id = SchoolConfiguration.facebook_app_id
app_secret = SchoolConfiguration.facebook_secret
auther = Mogli::Authenticator.new(app_id, app_secret, "")
token = auther.get_access_token_for_application
client = Mogli::Client.new(token)
client.post(app_id, nil, :canvas_fluid_width => true, :access_token => token)
rescue
puts "Ignoring an exception..."