git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
<?php | |
require 'tmhOAuth.php'; // Get it from: https://github.com/themattharris/tmhOAuth | |
// Use the data from http://dev.twitter.com/apps to fill out this info | |
// notice the slight name difference in the last two items) | |
$connection = new tmhOAuth(array( | |
'consumer_key' => '', | |
'consumer_secret' => '', | |
'user_token' => '', //access token |
function parse_message( &$tweet ) { | |
$replace_index = array(); | |
if ( !empty($tweet['entities']) ) { | |
foreach ($tweet['entities'] as $area => $items) { | |
switch ( $area ) { | |
case 'hashtags': | |
$find = 'text'; | |
$prefix = '#'; | |
$url = 'https://twitter.com/search/?src=hash&q=%23'; | |
break; |
<?php | |
$code = $tweets->text; | |
//Convert urls to <a> links | |
$code = preg_replace("/([\w]+\:\/\/[\w-?&;#~=\.\/\@]+[\w\/])/", "<a target=\"_blank\" href=\"$1\">$1</a>", $code); | |
//Convert hashtags to twitter searches in <a> links | |
$code = preg_replace("/#([A-Za-z0-9\/\.]*)/", "<a target=\"_new\" href=\"http://twitter.com/search?q=$1\">#$1</a>", $code); | |
//Convert attags to twitter profiles in <a> links |
var delay = (function(){ | |
var timer = 0; | |
return function(callback, ms){ | |
clearTimeout (timer); | |
timer = setTimeout(callback, ms); | |
}; | |
})(); | |
$(function() { | |
var pause = 100; |
<?php | |
$html = ""; | |
$url = "http://ws.audioscrobbler.com/2.0/user/matrixfox/topartists.xml"; | |
$xml = simplexml_load_file($url); | |
for($i = 0; $i < 10; $i++){ | |
$title = $xml->artist[$i]->image['3']; | |
$title = str_replace("http://userserve-ak.last.fm/serve/252/","",$title); | |
$html .= "<img src='http://userserve-ak.last.fm/serve/252/$title'>"; | |
} | |
echo $html; |
var nodemailer = require("nodemailer"); | |
// create reusable transport method (opens pool of SMTP connections) | |
var smtpTransport = nodemailer.createTransport({ | |
service: "Gmail", | |
auth: { | |
user: "*******************", | |
pass: "*******************" | |
} | |
}); |
<?php | |
/** | |
* Loop Add to Cart | |
*/ | |
global $product; | |
if( $product->get_price() === '' && $product->product_type != 'external' ) return; | |
?> |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream