Skip to content

Instantly share code, notes, and snippets.

@nadavoid
nadavoid / xdebug.ini
Created September 23, 2011 14:32
xdebug config file
;;;;;;;;;;
; XDebug ;
;;;;;;;;;;
zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
;xdebug.remote_host=localhost
@christianchristensen
christianchristensen / osx.sh
Created October 5, 2011 04:26
Drush core-quick-drupal (qd) install
brew install https://raw.github.com/gist/1264605/742c6b14a99184f71cdbf572dd1450954465d0e3/php53osx.rb --with-sqlite
# alt https://github.com/msonnabaum/megalodon/blob/master/formulas/php.rb
sudo pear channel-discover pear.drush.org
sudo pear install Console_Table
sudo pear install drush/drush-5.0.0
sudo drush
drush qd -y
@dvessel
dvessel / README.mdown
Last active December 10, 2024 11:34
Sass+Compass, Guard, LiveReload

This will enable Sass+Compass with LiveReload through Guard. (Guard screen cast)

You will also need a browser component to communicate with LiveReload. (browser extension, livereload.js)

If you prefer going through a GUI, that option is available. The following instructions is specific to Mac OS X and it works through the command line.

Note that this is not specific to Rails projects. This can work for any standalone front-end project.

Instructions

@travist
travist / gist:1648952
Created January 20, 2012 18:45
Determine how productive your team has been using git history.
git log --shortstat --since="1 year ago" --until="now" \
| grep "files changed\|Author\|Merge:" \
| awk '{ \
if ($1 == "Author:") {\
currentUser = $2;\
}\
if ($2 == "files") {\
files[currentUser]+=$1;\
inserted[currentUser]+=$4;\
deleted[currentUser]+=$6;\
<?php
$fields = array(
"groups" => array("52d1c068-f611-11e0-a44b-12313d04fc0f"),
"title" => "Test Event Creation",
"description" => "Description test goes here...",
"date_time" => array(
"start" => "2012-02-15T08:05:00",
"end" => "2012-02-15T09:05:00",
),
@christianchristensen
christianchristensen / gist:1683963
Created January 26, 2012 17:40
nginx + php OSX local

(originally from: http://elytra.net/2011/03/31/hello-world/)

Howto

Install nginx+PHP:

brew install https://raw.github.com/ampt/homebrew/php/Library/Formula/php.rb --with-fpm --with-mysql --enable-cgi
brew install nginx
@myobie
myobie / mountain-lion-brew-setup.markdown
Created February 18, 2012 20:14
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

$ cat makefile

server:
	drush rs --watchdog
clock:
	while true; do drush cron -v; sleep 10s; done

$ cat Procfile

@bcmiller
bcmiller / pre-commit
Created March 16, 2012 18:28
pre-commit
#!/bin/sh
# Place as .git/hooks/pre-commit
#Reject any commit that would have PHP syntaz errors on .php , .module, .install, .inc files
####
# Reject any commit that would add a line with tabs.
#
# You can enable this as a repo policy with
#
# git config hooks.allowtabs true
####
@e2thex
e2thex / gist:3148658
Created July 20, 2012 04:16
sps_drupal()
<?php
namespace Drupal/sps
/**
* This is to assit in calling function outside of the sps
* module that might have side effect. It allows for test to
* change the function for there tests
* the syntax to use is