Skip to content

Instantly share code, notes, and snippets.

busy, busy

Mike Bijon mbijon

busy, busy
View GitHub Profile
#set -x
# Shows you the largest objects in your repo's pack file.
# Written for osx.
# @see
# @author Antony Stubbs
# set the internal field spereator to line break, so that we can iterate easily over the verify-pack output
mbijon / gist:8875213
Created Feb 8, 2014
git checkout/clone over the top of an existing set of files
View gist:8875213
git clone --no-checkout repo-address subdir/tmp
mv subdir/tmp/.git subdir/.git/ # final "/" important
rm -Rf subdir/tmp
cd subdir
git reset --hard HEAD
mbijon / php.partial.ini
Created Mar 22, 2014
XDebug config for verbose debugging info
View php.partial.ini
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.collect_params = 2
xdebug.collect_return = 1
xdebug.collect_vars = 0
xdebug.overload_var_dump = 1
xdebug.show_local_vars = 1
xdebug.profiler_append = 0
View php.partial.ini
; Whether the CLI web server uses ANSI color coding in its terminal output.
;Relative to the number of cached files (you may need to watch your stats for a day or two to find out a good number)
;Relative to the size of WordPress
mbijon / return_output.htm
Last active Aug 29, 2015
Test code & results: Tugboat Yards API + WordPRess HTTP API
View return_output.htm
=== Whooo PLACEMENTS ===
array(5) {
["headers"]=> array(7) {
["content-type"]=> string(16) "application/json"
["date"]=> string(29) "Fri, 23 May 2014 04:32:20 GMT"
["server"]=> string(20) "nginx/1.4.6 (Ubuntu)"
["strict-transport-security"]=> string(16) "max-age=31536000"
["x-forwarded-proto"]=> string(5) "https"
["content-length"]=> string(3) "469"
["connection"]=> string(5) "Close"
View git-prune-tags.rb
#!/usr/bin/env ruby
require 'readline'
def prompt(prompt="> ")
input = nil
prompt += " " unless prompt =~ /\s$/
loop do
input = Readline.readline(prompt)
break if input.length > 0
mbijon / getOperators.request.xml
Last active Aug 29, 2015
TAB Ratings API: example SOAP request: 1st two versions for getMarket() method, 3rd & following versions work with getOperators() method
View getOperators.request.xml
<soapenv:Envelope xmlns:eyes="" xmlns:soapenv="">
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="" xmlns:wsu="">
<wsse:UsernameToken wsu:Id="UsernameToken-AFF5317EC8B51F3253140417628900000">
<wsse:Password Type="">PASSWORD</wsse:Password>
<wsse:Nonce EncodingType="">a1RMQXpEakg1ajZJV0VUTQ==</wsse:Nonce>
This is a module that defines some helper classes and functions for
expiring groups of related keys at the same time.
Written July 1-2, 2013 by Josiah Carlson
Released into the public domain
import time
View gist:62c465907577e8044df4
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL
if ( !$frag->output() ) { // NOTE, testing for a return of false
// YOU CANNOT FORGET THIS. If you do, the site will break.
View yolo.php
class React_YOLO {
public function __construct() {
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
public function admin_menu() {
add_menu_page( 'React', 'React', 'edit_posts', 'react', array( $this, 'page' ) );