Skip to content

Instantly share code, notes, and snippets.

View buley's full-sized avatar
🤑

Tay buley

🤑
View GitHub Profile
@buley
buley / gist:2604392
Created May 5, 2012 17:59
Highlight dupes in Amazon Cloud Player
var dedupe_view = function() {
var z = jQuery( '.titleCell' ), zlen = z.length, curr, last;
for ( var y = 0; y < 2; y += 1 ) {
for ( var x = 0; x < zlen; x += 1 ) {
zitem = z[ x ];
curr = jQuery( zitem ).attr( 'title' );
if ( curr === "" || curr === null || 'undefined' === typeof curr ) continue;
if ( last === curr ) {
jQuery( zitem ).parent().find( '[actiontypes="remove"]' ).click().parent().click().parent().click();
} else {
@slojo404
slojo404 / index.html
Created April 18, 2012 20:20 — forked from bunkat/index.html
Timeline using d3.js
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Chronological Diagram of Asia</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script>
<style type="text/css">
.chart {
shape-rendering: crispEdges;
}
@jo-snips
jo-snips / events-conditional-wrappers.php
Last active March 13, 2025 17:33
The Events Calendar: Basic Conditional Wrappers
<?php
/*-----------------------------------------------------------------------------------*/
/* Conditional Logic to Detect Various Event Related Views/Pages
/*-----------------------------------------------------------------------------------*/
if( tribe_is_month() && !is_tax() ) { // Month View Page
echo 'were on the month view page';
} elseif( tribe_is_month() && is_tax() ) { // Month View Category Page
@gilmoreorless
gilmoreorless / proxy.js
Created April 1, 2012 23:12
Basic HTTP proxy that introduces random delays to responses, to help test network race conditions
#!/usr/bin/env node
/**
* INSTRUCTIONS
*
* npm install http-proxy
* node proxy.js
*/
var config = {
@DAddYE
DAddYE / hack.sh
Created March 19, 2012 11:31
OSX For Hackers
#!/bin/sh
##
# This is a script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# Run in interactive mode with:
# $ sh -c "$(curl -sL https://raw.github.com/gist/2108403/hack.sh)"
#
# or run it without prompt questions:
@luetkemj
luetkemj / wp-query-ref.php
Last active August 18, 2025 12:15
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@kevinSuttle
kevinSuttle / meta-tags.md
Last active October 9, 2025 17:56 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@EdwardBetts
EdwardBetts / untruncate.py
Created February 24, 2012 20:03
Untruncate using Google Suggest API
from urllib import quote_plus
from lxml import etree
def untruncate(s):
q = s.strip(u' .\u2026')
url = 'http://google.com/complete/search?output=toolbar&q=' + quote_plus(q.encode('latin-1'))
root = etree.parse(url).getroot()
return q + root[0][0].attrib['data'][len(q):] if len(root) else s
def demo():
@Simbul
Simbul / pre-commit
Created February 9, 2012 18:06
Git hook to prevent commits on a staging/production branch
#!/usr/bin/env ruby
# This pre-commit hook will prevent any commit to forbidden branches
# (by default, "staging" and "production").
# Put this file in your local repo, in the .git/hooks folder
# and make sure it is executable.
# The name of the file *must* be "pre-commit" for Git to pick it up.
FORBIDDEN_BRANCHES = ["staging", "production"]
@lb
lb / get_latest_chromium.sh
Created December 22, 2011 10:17 — forked from jehiah/get_latest_chromium.sh
script to download the latest chromium build nightly
#!/bin/sh
## this is a quick and dirty script to automagically install the latest chromium build on OSX 10.5
## you can set this up as a nightly cron job, or run manually from the command line
# USAGE:
# save script to your home directory aka /Users/$USER/
# open up a command prompt (aka /Applications/Utilities/Terminal)
# run manually from the command line whenever you want the most recent chromium build
# $ sh get_latest_chromium.sh
# start it as a nightly task (runs at 1am or edit the plist below)