This file contains hidden or 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: RSS Featured Image | |
Description: Add feature images to your blog rss. | |
*/ | |
/* | |
* Code minimized from | |
* WP RSS Images (http://web-argument.com/wp-rss-images-wordpress-plugin/) | |
*/ |
This file contains hidden or 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: RSS Featured Image | |
Description: Add featured image to rss feed. | |
Version: 1.0 | |
*/ | |
/* | |
* Code minimized from | |
* WP RSS Images (http://web-argument.com/wp-rss-images-wordpress-plugin/) |
This file contains hidden or 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
(function () { | |
var $ = window.jQuery; | |
function init(){ | |
logIt("1"); | |
setTimeout(function(){logIt("2")}, 1000); | |
setTimeout(function(){logIt("3")}, 2000); | |
setTimeout(function(){logIt("4")}, 4000); | |
setTimeout(function(){logIt("5")}, 6000); | |
setTimeout(function(){logIt("6")}, 8000); | |
} |
This file contains hidden or 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
public function rewrite(){ | |
$replacements = <<<EOD | |
{ | |
"apple" : "fruit", | |
"tomato" : "fruit", | |
"kale" : "vegetable" | |
} | |
EOD; | |
$replacements = json_decode($replacements, true); |
This file contains hidden or 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
/* | |
Example of | |
if() { | |
if() { | |
async() | |
} | |
} | |
then another async |
This file contains hidden or 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
'use strict'; | |
var cluster = require('cluster'); | |
var bunyan = require('bunyan'); | |
if(cluster.isMaster) { | |
console.log('Master starting up! PID: ' + process.pid); | |
// Fork 20 workers. | |
for (var i = 0; i < 20; i = i + 1) { |
This file contains hidden or 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 | |
# Diff the JSON response from 2 or more URLs. | |
name=`basename $0` | |
if [ $# -lt 3 ] | |
then | |
echo "Usage: $NAME <path> <host 1> <host 2> <...>" 1>&2 | |
echo "Example: $NAME /foo https://www.example.com https://www.google.com https://www.amazon.com" 1>&2 | |
exit 1 |