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 | |
/** | |
* IMDB Wrapper API | |
* Wrapper class to retrieve data from IMDB | |
* http://jogisilalahi.com/blog/imdb-api-wrapper-class-php | |
* @author Jogi Silalahi <[email protected]> | |
*/ | |
class IMDB |
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 | |
$header = null; | |
$subscribers = array(); | |
$handle = fopen(dirname(__FILE__).'/members_PHP_Weekly_Feb_6_2013.csv', 'r'); | |
// fgetcsv is a bit naff, luckily I was able to massage this CSV into an easily parsable format | |
while (($line = fgetcsv($handle, 1000, ",")) !== false) { | |
if ($header === null) { | |
$header = $line; | |
} else { |
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
$call_limit = 350; // API calls (in an hour) | |
$time_limit = 60 * 60; // 1 hour (in seconds) | |
$transient_name = $host . "_rate_limit"; // Using their host name as the unique identifier | |
// Check to see if there are any transients that match the name, if not create a new one | |
if ( false === ( $calls = get_transient( $transient_name ) ) ) { | |
$calls[] = time(); | |
set_transient( $transient, $calls, $time_limit ); // Use an array of time() stamps for rolling effect | |
} else { | |
// There is already a transient with this name |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = array( |
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: Future Core Login | |
* Plugin URI: http://unserkaiser.com | |
* Description: Replacing the current stylesheets loaded on wp-login.php until this ticket goes into core: <a href="http://core.trac.wordpress.org/ticket/12506">#12506</a> | |
* Version: 0.1 | |
* Author: Franz Josef Kaiser | |
* Author URI: http://unserkaiser.com | |
* License: GPL2 | |
* |
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 | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
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
sudo port install php55 +fastcgi fcgi apache-ant php55-cgi php55-mbstring php55-curl php55-mcrypt php55-imagick php55-xdebug php55-iconv php55-mongo php55-oauth php55-openssl php55-esmtp php55-pop3 php55-tidy php55-uploadprogress php55-pcntl php55-sockets php55-soap php55-ssh2 php55-big_int php55-gd php55-svm php55-html_parse php55-http php55-mysql php55-pdflib php55-pear php55-peb php55-posix php55-pspell php55-rar php55-redis php55-snmp php55-stomp php55-svn php55-wddx php55-xmlrpc php55-yaml php55-zip php55-dbase php55-excel php55-gdchart php55-imap php55-xsl php55-redis | |
sudo port install postgresql92 postgresql92-server postgresql92-doc postgresql_autodoc php55-postgresql phppgadmin postgresql-jdbc mysql5-server phpmyadmin maven3 maven-ant-tasks | |
sudo port install nginx +flv +geoip +gzip_static +mail +mp4 +ssl +status +substitution +upload +upload_progress +xslt +zip | |
You may need to update your php.ini for any changes that have been made in this version of php55. Compare /opt/local/etc/php55/php.ini wit |
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
#!/bin/bash | |
# script location | |
available=/etc/nginx/sites-available | |
enabled=/etc/nginx/sites-enabled | |
sites=/media/psf/Home/Sites | |
www=/var/www | |
# load in str replace function | |
. /usr/bash-scripts/gsub_literal.sh |
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
// modules | |
var redis = require('redis'); | |
var Step = require('step'); | |
// config file | |
var config = require('config'); | |
// mysql client connect | |
var mysql = require('mysql'); | |
var connection = mysql.createConnection({ |
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 'sinatra' | |
require 'redis' | |
require 'json' | |
require 'date' | |
class String | |
def &(str) | |
result = '' | |
result.force_encoding("BINARY") |
OlderNewer