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 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 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 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 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 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 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
<!-- From http://github.com/paulirish/html5-boilerplate --> | |
<!-- Grab Google CDN's jQuery. fall back to local if necessary --> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script>!window.jQuery && document.write('<script src="js/jquery-1.4.2.min.js"><\/script>')</script> |
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
<!--> | |
Following code gets information about photos from Flickr via YQL for the given search term | |
Author : avinash | |
Email : avinash@tutkiun.com | |
<--> | |
<h2>Using YQL to Access the Flickr API</h2> | |
<form name='upcoming_form'> |
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
//XHR to retrieve an atom feed and parse the result | |
//with MooTools Slick selector engine | |
new Request({ | |
url: '/index.php?format=feed&type=atom', | |
data : 'xml', | |
method: 'get', | |
onComplete: function(responseText, responseXML) { | |
console.log(Slick.search(responseXML, 'entry > title')); | |
} | |
}).send(); |
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
new Request({ | |
url: '/sitemap.xml', | |
method: 'get', | |
onSuccess: function(responseText, responseXML) { | |
responseXML.getElements('url').each(function(url) { | |
alert(item.getElement('loc').get('text')); | |
}); | |
} | |
}).send(); |
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
#code from article at http://beardscratchers.com/journal/compressing-css-and-javascript-with-yui-compressor | |
JSDIR="./www/js" | |
echo "1. Combining Javascript" | |
# Combine all the javascript to a single temporary file | |
cat $JSDIR/mootools-1.2-core.js \ | |
$JSDIR/mootools-1.2-more.js \ | |
$JSDIR/functions.js \ |
OlderNewer