Skip to content

Instantly share code, notes, and snippets.

View paulcurley's full-sized avatar

Paul paulcurley

View GitHub Profile
@boctor
boctor / BaseViewController.m
Created May 5, 2011 02:08
A base view controller class that when running on the simulator in debug mode, will auto simulate a memory warning every time the view controller's viewDidAppear is called
//
// BaseViewController.m
//
// Created by Peter Boctor on 5/4/11.
//
// Copyright (c) 2011 Peter Boctor
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
@alkema
alkema / deploy.rb
Created July 9, 2011 20:01
Capistrano task for a Node.js app with github Forever and NPM.
set :application, "appname"
set :deploy_to, "/var/www"
set :scm, :git
set :repository, "git@github.com:user/app.git"
default_run_options[:pty] = true
set :user, "www-data"
set :domain, "foo.tld"
set :normalize_asset_timestamps, false
@saetia
saetia / gist:1623487
Last active July 16, 2024 05:56
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@andyadams
andyadams / gist:2030363
Created March 13, 2012 18:08
Capistrano Pulldown scripts for WordPress database and uploads
desc "Pull a database dump from remote server, drop the local database, then import the dump"
task :pull_database_to_local do
# Build out temporary file name with timestamp for uniqueness
timestamp = get_timestamp
temp_file_name = "database_dump_#{timestamp}"
remote_file_name = remote_mysqldump(temp_file_name)
download(remote_file_name, "/tmp/#{temp_file_name}.sql.gz")
@jonnyreeves
jonnyreeves / Logger.js
Created May 4, 2012 15:59
Quick and dirty JavaScript Logging Shim
/*global require, define */
define(function (require) {
"use strict";
var slice = Array.prototype.slice;
// Simple logging shim which allows log messages to be filtered and redirected to a logging solution
// of your choice when debugging.
var Logger = {
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 26, 2024 12:21
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@magadanskiuchen
magadanskiuchen / gist:3189045
Created July 27, 2012 16:38
Get All Photos for a Facebook Page
<?php
// make sure you have enough time to download all pictures
ini_set('max_execution_time', 6000);
ini_set('memory_limit', '64M');
// include the Facebook PHP SDK - https://github.com/facebook/php-sdk/
require 'facebook.php';
// enter your App ID and App Secret
// register an FB App at https://developers.facebook.com/apps/
@cowboy
cowboy / grunt-subgrunt.js
Created October 2, 2012 13:31
Grunt 0.4.0a (devel) Run a subproject's grunt tasks.
/*
* grunt-subgrunt
* http://gruntjs.com/
*
* Copyright (c) 2012 "Cowboy" Ben Alman
* Licensed under the MIT license.
* https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
*/
'use strict';
@camshaft
camshaft / app.js
Last active May 21, 2021 09:08
Superagent Middleware
/**
* Module dependencies
*/
var request = require("superagent");
/**
* Middleware to sign the request
*/
var authorizeRequest = function(token) {
@chipotle
chipotle / deploy.rb
Last active February 8, 2018 18:54
Capistrano deployment script for Laravel 4
# Capistrano Laravel 4 Deployment Tasks
# Watts Martin (layotl at gmail com)
# https://gist.github.com/chipotle/5506641
# updated 14-Aug-2013
# Assumptions:
#
# - You are using a .gitignore similar to Laravel's default, so your
# vendor directory and composer(.phar) are *not* under version control
# - Composer is installed as an executable at /usr/local/bin/composer