strpos(haystack, needle)
$leadingZero = sprintf("%02d", $string);
$currency = sprintf("%01.2f", $n);
error_reporting(E_ALL | E_STRICT); ini_set('display_errors', 1);
$(function() { ... }); // on pageload (jQuery)
#!/bin/bash | |
if [ -z "$1" -o -z "$2" ]; then | |
echo "usage: $0 <repository> <username>" | |
exit | |
fi | |
REPO=$1 | |
USER=$2 |
#!/bin/bash | |
# author: Duane Johnson <duane.johnson@gmail.com> | |
# contributor: Jansen Price <jansen.price@gmail.com> | |
# date: 2008 Jun 12 | |
# license: MIT | |
# | |
# Based on discussion at http://kerneltrap.org/mailarchive/git/2007/11/12/406496 | |
function main() { |
#!/bin/bash | |
# istidy will use the tidy program to fetch and parse a URL and provide a | |
# report on errors and warnings found. | |
# | |
# Usage: istidy <URL> | |
# Example: istidy http://google.com/ | |
# | |
# This script requires wget and tidy | |
# (apt-get install wget tidy) |
#!/bin/bash | |
message="Resuming Normal Mode" | |
width=`tput cols` | |
height=`tput lines` | |
len=${#message} | |
tput clear |
http://fantasticcontraption.com/game/Contraption.swf | |
http://static.learn4good.com/cms/upload/games/board/swf/battleships.swf | |
http://multiplayerchess.com/ | |
http://www.sheppardsoftware.com/braingames/mousetrap/mousetrapAS2.swf | |
http://www.sheppardsoftware.com/braingames/castledefensejr/castledefensejr.swf | |
http://www.gamechit.com/content/games/the-incredibles-save-the-day.swf | |
http://mapdive.weareinstrument.com/ | |
http://mammoth-quantalideas.rhcloud.com/ | |
http://games.mochiads.com/c/g/ice-breaker_v1/Icebreaker_mochi.swf | |
http://www.chromeplay.com/games/game2333.swf |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Version: 1.1.0 | |
# Settings for this VM | |
VM_HOSTNAME = "php55.dev" | |
VM_IPADDRESS = "192.168.100.5" | |
MYSQL_ROOT_PW = "1111" | |
TIMEZONE = "America/Chicago" |
#!/bin/bash | |
# Maybe Git | |
# INSTALLATION | |
# 1. Move this file into your ~/bin directory | |
# mv ./maybe-git ~/bin | |
# 2. Then run the following command: | |
# alias git='~/bin/maybe-git' |
# regex to split $uri to $fastcgi_script_name and $fastcgi_path | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
# Check that the PHP script exists before passing it | |
try_files $fastcgi_script_name =404; | |
# Bypass the fact that try_files resets $fastcgi_path_info | |
# see: http://trac.nginx.org/nginx/ticket/321 | |
set $path_info $fastcgi_path_info; | |
fastcgi_param PATH_INFO $path_info; |
# Reticent Memory | |
# By Jansen Price 3/17/2016 | |
# For Sonic Pi v2.9 | |
use_bpm 124 | |
# Don't log as much | |
use_debug false | |
# Set random seed |