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.
# -------------------------------------------------------- | |
export APXS2=`which apxs` | |
export CFLAGS="-arch x86_64 -O2" | |
export ARCHFLAGS="-arch x86_64" | |
export EDITOR='mate -w' | |
export CLICOLOR=1 | |
export TERM=xterm-color | |
export LSCOLORS=DxGxcxdxCxegedabagacad | |
export LC_CTYPE=en_US.UTF-8 |
<?php | |
namespace app\controllers; | |
use lithium\net\http\Router; | |
use lithium\storage\Session; | |
use li3_oauth\models\Consumer; | |
class WeiboController extends \lithium\action\Controller { |
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
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.
At some point in the past, I've decided to follow you on Twitter or any other social network, because you appeared to be a person whose postings I might be interested in.
But recently you noticed me unfollowing you.
Now you're confused/sad/angry. Don't be. Because here are the three simple rules I adhere to.
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
<?php | |
class PathSegmentEncode | |
{ | |
/** | |
* Map of allowed special chars in path segments. | |
* | |
* http://tools.ietf.org/html/rfc3986#appendix-A | |
* segement = *pchar | |
* pchar = unreserved / pct-encoded / sub-delims / ":" / "@" |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<title>Stripe Getting Started Form</title> | |
<script type="text/javascript" src="https://js.stripe.com/v1/"></script> | |
<!-- jQuery is used only for this example; it isn't required to use Stripe --> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
// this identifies your website in the createToken call below |
#!/bin/bash | |
OPSWORKS_USERDATA_LOG_FILE='/var/log/aws/opsworks/user-data.log' | |
export OPSWORKS_USERDATA_LOG_FILE | |
mkdir -p $(dirname ${OPSWORKS_USERDATA_LOG_FILE}) | |
touch ${OPSWORKS_USERDATA_LOG_FILE} && chmod 0600 ${OPSWORKS_USERDATA_LOG_FILE} | |
exec &> >(tee -a ${OPSWORKS_USERDATA_LOG_FILE}) 2>&1 | |
conslog () { | |
echo "[$(date --rfc-2822)] opsworks-init: $1" | tee -a ${OPSWORKS_USERDATA_LOG_FILE} > /dev/console |
# applescript | |
# add login item | |
osascript -e 'tell application "System Events" to make login item at end with properties {name: "Notes",path:"/Applications/Notes.app", hidden:false}' | |
# delete login item | |
osascript -e 'tell application "System Events" to delete login item "itemname"' | |
# list loginitems | |
osascript -e 'tell application "System Events" to get the name of every login item' |