A Pen by Captain Anonymous on CodePen.
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
// http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.1/wkhtmltox-0.12.1_osx-carbon-i386.pkg | |
// Requires a hacked grunt-wkhtmltopdf/tasks/wkhtmltopdf.js file (attached to this gist) | |
module.exports = function(grunt) | |
{ | |
grunt.initConfig( | |
{ | |
shell: { | |
php2html: { |
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
var gulp = require('gulp'); | |
var insert = require('gulp-insert'); | |
var less = require('gulp-less'); | |
var minify = require('gulp-minify-css'); | |
var rename = require('gulp-rename'); | |
var tap = require('gulp-tap'); | |
var watch = require('gulp-watch'); | |
var lazy = require('lazypipe'); | |
// Creates the desktop / unresponsive stylesheet |
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 | |
class i18n | |
{ | |
private static $strings = [ | |
'WELCOME' => [ | |
'en' => 'Welcome', | |
'es' => 'Bienvenidos', | |
], | |
]; |
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 | |
class v1_user extends \Pickles\Resource | |
{ | |
/** | |
* Has to be broken out by request method as to not cause fall out. The other | |
* option could be to grab all of the method names, loop through and look for | |
* the largest revision number (if the revision is not specified and _METHOD() | |
* doesn't exist | |
**/ |
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
function replicate() { | |
tick = String.fromCharCode(39), | |
lines = [ | |
'function replicate() {', | |
' tick = String.fromCharCode(39),', | |
'', | |
' lines = [', | |
' ];', | |
'', |
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 | |
if (isset($_GET['secret']) && $_GET['secret'] == 'some-secret-key') { | |
// @todo integrate a sanity check against this: | |
// https://help.github.com/articles/what-ip-addresses-does-github-use-that-i-should-whitelist/ | |
`git pull`; | |
} |
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
pkts bytes target prot opt in out source destination | |
2535 152K DROP all -- any any ec2-54-245-111-118.us-west-2.compute.amazonaws.com anywhere | |
11246 675K DROP all -- any any 200.ip-92-222-164.eu anywhere | |
810K 49M DROP all -- any any 191.ip-92-222-220.eu anywhere | |
109K 6553K DROP all -- any any 205.185.117.237 anywhere | |
113K 6759K DROP all -- any any 167.88.116.167 anywhere | |
1419K 85M DROP all -- any any ns201578.ip-91-121-132.eu anywhere | |
1580K 95M DROP all -- any any 5.79.16.34 anywhere | |
11332 589K DROP all -- any any southwind.fr anywhere | |
35540 2132K DROP all -- any any ec2-176-34-126-157.eu-west-1.compute.amazonaws.com anywhere |
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
/** | |
* Is Local | |
* | |
* Checks if the current site is hosted locally or not. | |
* | |
* @static | |
* @return boolean whether or not the site is hosted locally | |
*/ | |
public static function isLocal() | |
{ |
OlderNewer