UPSTART
sudo vi /etc/init/.conf
add inside:
description "<reponame>"
author "name"
<?php | |
!defined( 'ABSPATH' ) AND exit; | |
/* | |
Plugin Name: Custom Installation Script | |
Plugin URI: http://wordpress.stackexchange.com/q/75420/12615 | |
Description: Create our own content on WP install | |
License: GPL | |
*/ |
<?php | |
//returns a big old hunk of JSON from a non-private IG account page. | |
function scrape_insta($username) { | |
$insta_source = file_get_contents('http://instagram.com/'.$username); | |
$shards = explode('window._sharedData = ', $insta_source); | |
$insta_json = explode(';</script>', $shards[1]); | |
$insta_array = json_decode($insta_json[0], TRUE); | |
return $insta_array; | |
} |
<?php | |
/** | |
* Using WP-Member to hide / show content depending on various conditions. | |
* | |
* This displaying content depending on: | |
* * Whether the member has **only** the guest level attached to them (this includes, but not restricted to logged out users) | |
* * Whether the member has the level 'Some Level' attached to theme | |
* * Otherwise if the user is logged in, displays a different message. | |
* | |
*/ |
var objectToQueryString = function (a) { | |
var prefix, s, add, name, r20, output; | |
s = []; | |
r20 = /%20/g; | |
add = function (key, value) { | |
// If value is a function, invoke it and return its value | |
value = ( typeof value == 'function' ) ? value() : ( value == null ? "" : value ); | |
s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value); | |
}; | |
if (a instanceof Array) { |
UPSTART
sudo vi /etc/init/.conf
add inside:
description "<reponame>"
author "name"
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"> | |
</script> | |
<meta charset='utf-8' /> | |
<title> | |
infinite loop carousel(horizontal) | |
</title> |
/** | |
* Throttled Resize event | |
* Updated to use requestAnimationFrame instead of setTimeout | |
* Original: https://github.com/louisremi/jquery-smartresize | |
*/ | |
var $specialThrottle, | |
dummy = {_:0}, | |
frame = 0, | |
wasResized, |
// Load plugins | |
var gulp = require('gulp'), | |
plugins = require('gulp-load-plugins')({ camelize: true }), | |
lr = require('tiny-lr'), | |
server = lr(); | |
// Styles | |
gulp.task('styles', function() { | |
return gulp.src('assets/styles/source/*.scss') | |
.pipe(plugins.rubySass({ style: 'expanded', compass: true })) |
{ | |
"indent" : { | |
"value": " ", | |
"ArrayExpression": 1, | |
"AssignmentExpression": 1, | |
"BinaryExpression": 1, | |
"ConditionalExpression": 1, | |
"CallExpression": 1, | |
"CatchClause": 1, | |
"ConditionalExpression": 1, |