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
Dir | Rename-Item –NewName { $_.name –replace “ “,”_” } |
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 wptheme_end_head_scripts() { | |
?> | |
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
ga('create', 'UA-XXXXXXXX-X', 'auto'); | |
ga('send', 'pageview'); |
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
import random | |
promos = [] | |
def random_chars(): | |
return 'B' + ''.join(random.choice('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz') for i in range(6)) | |
while len(promos) < 2800: | |
promo = random_chars() | |
if promo not in promos: |
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 | |
/** | |
* We've stripped the script tags from header.php and relocated them to functions.php | |
*/ | |
// loads the external scripts | |
function wptheme_load_scripts() { | |
wp_deregister_script( 'jquery' ); // deregisters the version of jQuery shipped with WP so you can use Google's CDN | |
wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js' ); | |
wp_enqueue_script( 'jquery' ); // actually loads it on the page |
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
<!DOCTYPE html> | |
<html <?php language_attributes(); ?>> | |
<head> | |
<meta charset="<?php bloginfo( 'charset' ); ?>" /> | |
<title><?php wp_title( '|', true, 'right' ); ?></title> | |
<!-- JS --> | |
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/modernizr.js"></script> | |
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/script.js"></script> |
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
ENGAGE.Interstitial = function(options) { | |
if (!(this instanceof ENGAGE.Interstitial)) { | |
return new ENGAGE.Interstitial(options); | |
} | |
if (typeof options !== "undefined") { | |
this.blocked_class = options.blocked_class || this.blocked_class; | |
this.close_control = options.close_control || this.close_control; | |
this.container = options.container || this.container; | |
this.countdown = options.countdown || this.countdown; |
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
$namespace: '#your-id'; | |
#{$namespace} { | |
@include 'another-file'; | |
} |
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
SELECT * FROM table ORDER BY NEWID() | |
-- mysql version | |
SELECT * FROM table ORDER BY uuid() |
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
/** | |
* @author Ethan Gardner | |
* @see: http://www.ethangardner.com/articles/drawing-with-raphael-js-plus-a-bonus-for-guitar-players/ | |
*/ | |
var paper = new Raphael(document.id("fretboard"), 1300, 300); | |
/** | |
* Set up a GTR object to be used for namespacing | |
* @see http://www.ethangardner.com/articles/javascript-namespace-strategy-for-large-applications/ |
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
#!/usr/bin/zsh | |
COMPRESSOR=$(whence -p yui-compressor) | |
[ -z $COMPRESSOR ] && exit 0; | |
function _compress { | |
local fname=$1:t | |
local dest_path=$1:h | |
local min_fname="$dest_path/${fname:r}.min.${fname:e}" | |
$COMPRESSOR $1 > $min_fname |