Skip to content

Instantly share code, notes, and snippets.

View stormwarning's full-sized avatar
👀

Jeff stormwarning

👀
View GitHub Profile
<?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 );
/*
* 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],
@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]">
<?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 ){

VIDEO GAME STUFF

SNES

  • Controllers x4
  • VGA connector
  • Power brick

Games

  • Super Metroid
<?php
/**
* _s Theme Options
*
* @package _s
* @since _s 1.0
*/
/**
* Register the form setting for our _s_options array.
Sitemap: http://www.example.com/sitemap.xml
# Google Image
User-agent: Googlebot-Image
Disallow:
Allow: /*
# Google AdSense
User-agent: Mediapartners-Google
Disallow:
@stormwarning
stormwarning / gist:9697213
Last active August 29, 2015 13:57
Sublime Text / Atom editor tweaks
/**
* @link http://webdesign.tutsplus.com/articles/simple-visual-enhancements-for-better-coding-in-sublime-text--webdesign-18052
* @link http://daleanthony.com/sublime-for-designers/
*/
"font_face": "Inconsolata";
"font_size": 18;
"line_padding_bottom": 1,
"line_padding_top": 1,
// highlight_line
@stormwarning
stormwarning / browserSniff.js
Last active August 29, 2015 13:57
Quick & dirty browser sniff to detect mobile devices.
/**
* Quick & dirty browser sniff to detect mobile devices.
*/
var isMobile = false;
if( navigator.userAgent.match(/Android/i) ||
navigator.userAgent.match(/webOS/i) ||
navigator.userAgent.match(/iPhone/i) ||
navigator.userAgent.match(/iPod/i) ||
navigator.userAgent.match(/iPad/i) ||
/**
*
*
* @link http://demosthenes.info/blog/832/Easy-Parallax-Effects-With-Em
*/
div#parallax {
background-image: url(blurred-background-small.jpg);
background-size: cover; padding-top: 62.5%;
overflow: hidden; position: relative;
font-size: .1em; }