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 | |
$results = array(); | |
$r_players = '/\/players\/(.+?)\/profile\?id\=[A-Z0-9]+/'; | |
for($i='a';$i!='c';$i++){ | |
$base = 'http://www.nfl.com/players/search?category=lastName&filter='.$i.'&playerType=current'; | |
$url = $base; | |
$d = 2; | |
$page_check = 1; |
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 | |
//number of people in the reservation | |
$people = 2; | |
//time, just the hour, pm | |
$time = 7; | |
$url = 'http://www.opentable.com/nextavailabletable.aspx?hpu=1025002033&shpu=1&rid=1180&m=4&d=8/13/2010+'.$time.':00:00+PM&p='.$people; | |
$data = file_get_contents($url); | |
$regex = '/\[\'\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}\:\d{2}\:\d{2} PM/'; |
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 | |
/* | |
Plugin Name: Optimizely | |
Description: Runs Optimizely experiments. | |
Author: koop, evansolomon | |
Version: 0.2 | |
*/ | |
class WPCOM_Optimizely { | |
public $version; |
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 | |
/* | |
Plugin Name: WP Kissmetrics | |
Description: Record events using Kissmetrics' PHP API. Intended to be used by developers only. | |
Author: evansolomon | |
Version: 1.0 | |
*/ | |
/* Forked from https://github.com/kissmetrics/KISSmetrics/blob/master/km.php */ |
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 | |
/** | |
* User uploads a video | |
*/ | |
function user_uploads_video( $args, $upload ) { | |
if( 'upload' != $upload ) | |
return; | |
if( 0 === strpos( $args['type'], 'video' ) ) { | |
//do cool stuff |
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 | |
/* | |
Plugin Name: Privacy Please | |
Description: A more private way to use WordPress without the hassle of passwords and such. Logged out users can only access single posts, and only if they know the exact URL. | |
Author: Evan Solomon | |
*/ | |
/* Only allow singe page views */ | |
function only_singular_requests_for_you() { | |
if( ! is_user_logged_in() && ! is_singular() ) |
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
PROMPT_COMMAND='DIR=`pwd|sed -e "s!$HOME!~!"`; if [ ${#DIR} -gt 30 ]; then CurDir=${DIR:0:12}...${DIR:${#DIR}-15}; else CurDir=$DIR; fi' | |
# show git branch name in prompt | |
PS1='\[\e[1;32m\]\u: $CurDir $(__git_ps1 " (%s)")\$\[\e[0m\] ' | |
# make bash autocomplete with up arrow | |
bind '"\e[A":history-search-backward' | |
bind '"\e[B":history-search-forward' | |
# make tab cycle through commands instead of listing |
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
#!bash | |
# | |
# bash completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
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
cd ~ | |
wget http://www.dotdeb.org/dotdeb.gpg | |
cat dotdeb.gpg | sudo apt-key add - | |
rm dotdeb.gpg | |
sudo apt-get update | |
sudo apt-get upgrade |
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
; Start a new pool named 'www'. | |
; the variable $pool can we used in any directive and will be replaced by the | |
; pool name ('www' here) | |
[www] | |
; Per pool prefix | |
; It only applies on the following directives: | |
; - 'slowlog' | |
; - 'listen' (unixsocket) | |
; - 'chroot' |
OlderNewer