This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace Lukaswhite\Pagination; | |
use Illuminate\Pagination\Paginator; | |
class FoundationPresenter { | |
/** | |
* The paginator instance being rendered. | |
* | |
* @var \Illuminate\Pagination\Paginator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* T'ipsum, a dead simple class for generating Yorkshire t'ipsum. | |
* | |
* Based on http://tlipsum.appspot.com/ by @tonyblundell. | |
*/ | |
class Tipsum { | |
/** | |
* The actual text | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Console\Command; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Input\InputArgument; | |
class ClearBeanstalkdQueueCommand extends Command { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CONFIGURATION | |
#MYSQL credentials | |
MYSQL_USER="root" | |
MYSQL_PASS="" | |
# The user Apache runs as - e.g. _www, www-data | |
APACHE_RUNAS="_www" | |
#Bitbucket credentials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Java | |
sudo apt-get install openjdk-7-jre-headless -y | |
# Download & install the Public Signing Key | |
wget -qO - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add - | |
# Add the following to /etc/apt/sources.list | |
deb http://packages.elasticsearch.org/elasticsearch/1.3/debian stable main | |
# Update Aptitude |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('lodash') | |
var routes = _.map(_.filter(app._router.stack, function(item){ | |
return (item.route != undefined) | |
}), function(route){ | |
return { | |
path: route.route.path, | |
method: Object.keys(route.route.methods)[0] | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am lukaswhite on github. | |
* I am lukaswhite (https://keybase.io/lukaswhite) on keybase. | |
* I have a public key whose fingerprint is 71E9 57B9 7336 A635 0B44 E769 5136 FCD6 881C 9CDA | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'date' | |
module Jekyll | |
module OrdinalizedDate | |
def ordinalized_date(input) | |
d = input.strftime("%e") | |
input.strftime("%A ") + self.ordinalize(d.to_i) + input.strftime(" %B, %Y") | |
end | |
def ordinalize(number) | |
if (11..13).include?(number % 100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(-1); | |
ini_set('display_errors', 'On'); | |
define('DRUPAL_ROOT', getcwd()); | |
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); | |
drupal_flush_all_caches(); | |
print 'All caches cleared'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls -l | awk '{k=0;for(i=0;i<=8;i++)k+=((substr($1,i+2,1)~/[rwx]/) \ | |
*2^(8-i));if(k)printf("%0o ",k);print}' |
OlderNewer