Skip to content

Instantly share code, notes, and snippets.

View stormwarning's full-sized avatar
👀

Jeff stormwarning

👀
View GitHub Profile
Sitemap: http://www.example.com/sitemap.xml
# Google Image
User-agent: Googlebot-Image
Disallow:
Allow: /*
# Google AdSense
User-agent: Mediapartners-Google
Disallow:
<?php
/**
* _s Theme Options
*
* @package _s
* @since _s 1.0
*/
/**
* Register the form setting for our _s_options array.

VIDEO GAME STUFF

SNES

  • Controllers x4
  • VGA connector
  • Power brick

Games

  • Super Metroid
<?php
/* ------------------------------------------------------------------------------
* FILTER JETPACK OPEN GRAPH TAGS ADDITIONAL TWITTER CARD SUPPORT, FACEBOOK PUBLISHER, AND OG:META FIXES
* For the WordPress VIP environment.
* @see https://dev.twitter.com/docs/cards
* @see https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more/
* ---------------------------------------------------------------------------- */
add_filter( 'jetpack_open_graph_tags', function( $tags ){
@stormwarning
stormwarning / open-graph.html
Created April 1, 2014 23:08
OpenGraph & Twitter Card meta tags.
<meta name="twitter:card" content="[summary]">
<meta name="twitter:site" content="[@handle]">
<meta name="twitter:creator" content="[@handle]">
<meta property="og:url" content="[url]">
<meta property="og:title" content="[title]">
<meta property="og:description" content="[summary]">
<meta property="og:image" content="[image url]">
/*
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/
* Better handling of scripts without supplied ids.
*
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function.
*/
(function(doc, script) {
var js,
fjs = doc.getElementsByTagName(script)[0],
<?php
function geo_ip( $current_ip = 'none' ) {
$current_ip = ( 'none' == $current_ip ? $_SERVER['REMOTE_ADDR'] : $current_ip );
$url = 'http://freegeoip.net/json/' . $current_ip;
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL, $url );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_HEADER, false );
@stormwarning
stormwarning / console.js
Last active August 29, 2015 14:05
Clever little console.log from mapbox.com
// Hiring smart people
if (typeof console !== 'undefined' && typeof console.log === 'function') {
console.log('\r\n%c * .--.\r\n%c \/ \/ `\r\n%c + | |\r\n%c \' \\ \\__,\r\n%c * + \'--\' *\r\n%c + \/\\\r\n%c + .\' \'. *\r\n%c * \/======\\ +\r\n%c ;:. _ ;\r\n%c |:. (_) |\r\n%c |:. _ |\r\n%c + |:. (_) | *\r\n%c ;:. ;\r\n%c .\' \\:. \/ `.\r\n%c \/ .-\'\':._.\'`-. \\\r\n%c |\/ \/||\\ \\|\r\n%c _..--\"\"\"````\"\"\"--.._\r\n%c _.-\'`` ``\'-._\r\n%c -\' %cHello, explorer%c \'-\r\n%c' +
'\n Curious? http://mapbox.com/jobs',
'color:#D0E3F1','color:#D0E3F1','color:#C0DAEC','color:#C0DAEC','color:#B0D1E8','color:#B0D1E8','color:#A1C7

Keybase proof

I hereby claim:

  • I am stormwarning on github.
  • I am stormwarning (https://keybase.io/stormwarning) on keybase.
  • I have a public key whose fingerprint is DCC1 710F F6EC 1BAE F346 D939 BC0A 96F4 9357 0C6C

To claim this, I am signing this object:

@stormwarning
stormwarning / aspect-ratio.scss
Created February 4, 2015 05:15
Sass (SCSS) variables for common aspect ratios.
/**
* Variables for common aspect ratios.
*/
$golden: 61.8047%; // 1.6180:1
$35mm: 66.6667%; // 3:2
$panorama: 33.3333%; // 3:1
$imax: 69.9301%; // 1.43:1
$widescreen: 56.1798%; // 1.78:1