Skip to content

Instantly share code, notes, and snippets.

View whalesalad's full-sized avatar
🖨️
PC LOAD LETTER

Michael Whalen whalesalad

🖨️
PC LOAD LETTER
View GitHub Profile
/*
Via: https://assets3.github.com/stylesheets/bundle_github.css?a67b8cfa33e6ab438b61f7ff97133ba9d188d010
View the star here: https://assets3.github.com/images/modules/explore/gold_star.png
*/
.ranked-repositories h3.yours{background:url(/images/modules/explore/gold_star.png) 0 3px no-repeat;}
.ranked-repositories h3.yours .goldstar{display:inline-block;width:11px;height:12px;}
$blog_title = $wpdb->get_var($wpdb->prepare("SELECT post_title FROM $wpdb->posts WHERE post_name = %s AND post_type='page'", 'blog'));
init_accordion: function() {
var contact = this;
window.currently_open = null;
var Office = function() {
var self = this,
args = arguments;
self.init.apply(self, args);
<?php
// do the work
$geo_url = "http://maps.google.com/maps/geo?q=%s&output=json&sensor=false&key=%s"; // query, api key
$delay = 0;
$uncoded_locations = $wpdb->get_results('select * from wp_arbesko_locations where `lat` = 0 AND `long` = 0');
foreach ($uncoded_locations as $key => $location) {
<?php
/*
Turn a url like 's:true:c:shoes:a:heavy' into something like
Array (
s: 'true', // safety vs. non-safety
c: 'shoes', // category = shoes
a: 'heavy // audience = heavy
);
<?php
/**
* My simple paginator.
*/
class Paginator {
private $total_items;
private $total_pages;
private $paginate_by;
private $current_page;
We couldn’t find that file to show.
<?php
/**
* @package WordPress
* @subpackage Settings
*/
/*
Instantiate it with a key, like $settings = new Settings('myplugin_settings');
<?php
$comment_id = wp_new_comment( $commentdata );
$comment = get_comment($comment_id);
/*
Another WordPress rant. Thursday, April 22nd, 2010
---------------------------------------------------------------------------
# thebus.dev server conf
server {
server_name thebus.dev;
root /home/michael/sites/thebus/static;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;