Skip to content

Instantly share code, notes, and snippets.

View mbijon's full-sized avatar
🎯
Focusing

Mike Bijon mbijon

🎯
Focusing
View GitHub Profile
/**
* $.parseParams - parse query string paramaters into an object.
*/
(function($) {
var re = /([^&=]+)=?([^&]*)/g;
var decodeRE = /\+/g; // Regex for replacing addition symbol with a space
var decode = function (str) {return decodeURIComponent( str.replace(decodeRE, " ") );};
$.parseParams = function(query) {
var params = {}, e;
while ( e = re.exec(query) ) {

#Create bitbucket branch

##Create local branch

$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
  master
* sync
# Go to plugins/jetpack/jetpack.php into the folder of your WP local website.
# Find the line (276) below:
/**
* Is Jetpack active?
*/
public static function is_active() {
return (bool) Jetpack_Data::get_access_token( JETPACK_MASTER_USER );
}
<div>
<h1>Makefolio</h1>
<p>Dispassionate extraterrestrial observer gathered by gravity bits of moving fluff gathered by gravity. Dream of the mind's eye, cosmic ocean hydrogen atoms galaxies vastness is bearable only through love the carbon in our apple pies stirred by starlight Apollonius of Perga at the edge of forever bits of moving fluff.</p>
<p>Billions upon billions intelligent beings, corpus callosum trillion Sea of Tranquility culture, tingling of the spine something incredible is waiting to be known, kindling the energy hidden in matter are creatures of the cosmos Sea of Tranquility, worldlets as a patch of light intelligent beings, decipherment, Hypatia, rogue? Hearts of the stars, of brilliant syntheses birth circumnavigated. The ash of stellar alchemy!</p>
<p>Billions upon billions? Venture! Dispassionate extraterrestrial observer culture! Dispassionate extraterrestrial observer kindling the energy hidden in matter hundreds of thousands venture, Vangelis shores of the cosmic ocean sta
@mbijon
mbijon / .zshrc
Created February 27, 2013 18:34 — forked from SlexAxton/.zshrc
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@mbijon
mbijon / README.md
Created January 2, 2013 21:25 — forked from oodavid/README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
Date: Thu, 20 Dec 2012 16:28:50 -0500
From: Daryl Koopersmith <koop@wordpress.org>
Subject: Re: [wp-hackers] Javascript bind event for 3.5's new
uploader?
To: wp-hackers@lists.automattic.com
Message-ID: <DB193711A3AC46F1AA76AAE5940586BA@gmail.com>
Content-Type: text/plain; charset="utf-8"
> I'm trying to add an action when the uploader is displayed, but I
> can't seem to call the .on or .bind from external code.
@mbijon
mbijon / .gitignore
Created September 29, 2012 08:11 — forked from redoPop/.gitignore
Template .gitignore file for WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
@mbijon
mbijon / generate_update.sh
Created November 20, 2011 08:31 — forked from xentek/generate_update.sh
Generate the necessary sql statements to move a WordPress site from one environment to another
#!/usr/bin/env bash
echo "@@@ @@@ @@@@@@@@ @@@ @@@ @@@@@@@ @@@@@@@@ @@@ @@@ "
echo "@@@ @@@ @@@@@@@@ @@@@ @@@ @@@@@@@ @@@@@@@@ @@@ @@@ "
echo "@@! !@@ @@! @@!@!@@@ @@! @@! @@! !@@ "
echo "!@! @!! !@! !@!!@!@! !@! !@! !@! @!! "
echo " !@@!@! @!!!:! @!@ !!@! @!! @!!!:! @!@@!@! "
echo " @!!! !!!!!: !@! !!! !!! !!!!!: !!@!!! "
echo " !: :!! !!: !!: !!! !!: !!: !!: :!! "
echo ":!: !:! :!: :!: !:! :!: :!: :!: !:! "
@mbijon
mbijon / TCB_JSON_API.php
Created November 3, 2011 06:55 — forked from mikeschinkel/TCB_JSON_API.php
Creates JSON class for Tom C. Barret to load tickets via a RESTful API
<?php
/**
* Creates JSON class for Tom C. Barrett to load tickets via a RESTful API:
*
* @example:
*
* URL: http://example.com/api/ticket/12345
*
* @see:
*