Skip to content

Instantly share code, notes, and snippets.

View paulredmond's full-sized avatar
🏴‍☠️

Paul Redmond paulredmond

🏴‍☠️
View GitHub Profile
<?php
/**
* PluginRoute class.
*
* Route class for plugins that allows you to clean up urls for plugins
* without tons of calls to Router::connect() to shorten controller names in urls.
*/
class PluginRoute extends CakeRoute
{
require 'formula'
class Apc <Formula
url 'http://pecl.php.net/get/APC-3.1.4.tgz'
homepage 'http://php.net/manual/en/book.apc.php'
md5 ''
version '3.1.4'
def install
Dir.chdir "APC-#{version}" do
@lsmith
lsmith / a.js
Created May 22, 2011 13:57
Using YUI 3's groups config to support fetching non-YUI module js files ala requireJS pathing or explicit url
We couldn’t find that file to show.
@justinrainbow
justinrainbow / build-yui-loader.js
Created January 23, 2012 19:03
Builds a YUI Loader config for all your custom YUI3 modules
var util = require('util'),
exec = require('child_process').exec,
modules = {},
// what to strip off the pathname (/my/dir/web becomes /web)
docroot = __dirname+'/webroot',
// where to search for YUI.add in files
path = __dirname+'/webroot/bundles',
file,
child;
@justinrainbow
justinrainbow / watch.js
Created March 27, 2012 21:19
Auto building of YUI3 modules
var watch = require('watch'),
spawn = require('child_process').spawn,
queue = [],
proc;
function run(path) {
if (proc) {
return queue.push(path);
}
@rgrove
rgrove / node-scroll-info.js
Created June 6, 2012 21:35
node-scroll-info.js
/*!
Copyright (c) 2012 Ryan Grove. All rights reserved.
Redistribution and use of this software in source and binary forms, with or
without modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
#
# After running cap deploy:cold, You'll need to remove all files from the
# domains/yourdomain.com/html directory and turn the html directory into a
# symlink that links to ./current which is also a symlink setup by capistrano.
#
# install the mt-capistrano gem, not sure if it is really needed in most situations
require 'mt-capistrano'
# Configure these
@paulredmond
paulredmond / get-age.php
Created September 27, 2012 19:16
Get age with PHP's DateTime
<?php
$birthday = '01/01/1970';
$age = DateTime::createFromFormat('m/d/Y', $birthday)
->diff(new DateTime('now'))
->y;
@paulredmond
paulredmond / Custom.css
Created August 17, 2011 17:11
Espresso syntax theme for Google Chrome Inspector
/**********************************************/
/*
/* Espresso-inspired theme for Google Chrome Inspector
/*
/* By: Paul Redmond http://github.com/paulredmond
/*
/* Inspired by Darcy Clarke's post - http://darcyclarke.me/design/skin-your-chrome-inspector/
/* Darcy Clarke's "Darker Skin" theme - http://darcyclarke.me/dev/inspectorskin/Custom.css
/*
/**********************************************/
@niepi
niepi / osx_php_homebrew.setup.md
Created February 28, 2012 13:23
OSX PHP Homebrew Setup

install php

with mysql pgsql intl support

$ brew install php --with-apache --with-mysql --with-pgsql --with-intl

set php timezone in php ini

date.timezone = Europe/Vienna