Skip to content

Instantly share code, notes, and snippets.

View stormwarning's full-sized avatar
👀

Jeff stormwarning

👀
View GitHub Profile
<?php
function _s_theme_options_init() {
register_setting(
'_s_options', // Options group, see settings_fields() call in _s_theme_options_render_page()
'_s_theme_options', // Database option, see _s_get_theme_options()
'_s_theme_options_validate' // The sanitization callback, see _s_theme_options_validate()
);
// Register our settings field group
add_settings_section(
@stormwarning
stormwarning / fb-numbers.php
Last active August 29, 2015 13:55
Return a count of Facebook Likes, Shares, Comments from Fan Pages.
<?php
/**
* Return the number of Likes, Shares, or Comments of a given Fan Page.
*/
function facebook_numbers( $url ) {
$fql = 'SELECT url, normalized_url, share_count, like_count, comment_count, ';
$fql .= 'total_count, commentsbox_count, comments_fbid, click_count FROM ';
$fql .= 'link_stat WHERE url = "' . $url . '"';
/**
* Cross-browser image desaturation filter
*
* 1. Chrome 19+, Safari 6+, Safari 6+ iOS
* 2. Firefox 10+, Firefox on Android
* 3. IE6-9
*/
%greyscale {
-webkit-filter: grayscale(100%); /* [1] */
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* [2] */
/**
* Vertically center an element's children.
*/
%vertical-center {
display: table;
> * {
display: table-cell;
vertical-align: middle;
}
/**
*
*
* @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; }
@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) ||
@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
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