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
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
/** | |
* Turn all URLs in clickable links. | |
* | |
* @param string $value | |
* @param array $protocols http/https, ftp, mail, twitter | |
* @param array $attributes | |
* @return string | |
*/ | |
public function linkify($value, $protocols = array('http', 'mail'), array $attributes = array()) |
<?php | |
class NewRelic_Error extends Exception {} | |
function NewRelic_Date(DateTime $date) { | |
return $date->format('Y-m-d') . 'T' . $date->format('H:i:s') . 'Z'; | |
} | |
function NewRelic_Metrics2Array(SimpleXMLElement $result) { | |
$return = array(); |
When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.
Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008
…………………………
<?php | |
### --- Snip --- ### | |
App::after(function($request, $response) | |
{ | |
// HTML Minification | |
if(App::Environment() != 'local') | |
{ | |
if($response instanceof Illuminate\Http\Response) |
server { | |
listen 80; | |
listen [::]:80; | |
server_name domain.com; | |
autoindex off; | |
index index.php index.html; | |
root /srv/www/domain.com/public; |
# Rails Stuff | |
alias stoprails='kill -9 $(lsof -i :3000 -t)' | |
alias startrails='rails server -d' | |
alias restartrails='stopRails && startRails' | |
#Check PHP For Erroes | |
alias phpcheck='find ./ -name \*.php | xargs -n 1 php -l' | |
# ROT13-encode text. Works for decoding, too! ;) | |
alias rot13='tr a-zA-Z n-za-mN-ZA-M' |
const mix = require('laravel-mix'); | |
const tailwindcss = require('tailwindcss'); | |
const rootPath = Mix.paths.root.bind(Mix.paths); | |
const tailwindPlugins = function(configFile, paths) { | |
const pluginList = [tailwindcss(configFile)]; | |
if (mix.inProduction()) { | |
pluginList.push(require('@fullhuman/postcss-purgecss')({ |