Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mbijon's full-sized avatar
🎯
Focusing

Mike Bijon mbijon

🎯
Focusing
View GitHub Profile
@mbijon
mbijon / phpinfo-after.txt
Last active December 11, 2015 08:49
For: http://core.trac.wordpress.org/ticket/23085 phpinfo() from XAMPP before & after upgrade: * WP test 'test_is_image_positive' fails on before with "mysql_error() expects parameter 1 to be resource, integer given" * Same test passes after upgrade
PHP Version 5.4.7
System Windows NT ALPHA7 6.1 build 7601 (Windows 7 Home Premium Edition Service Pack 1) i586
Build Date Sep 12 2012 23:44:56
Compiler MSVC9 (Visual C++ 2008)
Architecture x86
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--disable-static-analyze" "--with-pgo"
Server API Apache 2.4 Handler Apache Lounge
Virtual Directory Support enabled
@mbijon
mbijon / gist:4668746
Last active December 11, 2015 22:19
Enabling auto-update of nginx, Stable on Ubuntu
To enable automatic updates of Linux packages set up the apt repository for the Debian/Ubuntu distributions.
For Debian/Ubuntu, in order to authenticate the nginx repository signature and to eliminate warnings about missing gpg key during installation of the nginx package, it is necessary to add the key used to sign the nginx packages and repository to the apt program keyring. Please download this key from our web site, and add it to the apt program keyring with the following command:
sudo apt-key add nginx_signing.key
For Ubuntu replace codename with Ubuntu distribution codename, and append the following to the end of the /etc/apt/sources.list file:
deb http://nginx.org/packages/ubuntu/ codename nginx
deb-src http://nginx.org/packages/ubuntu/ codename nginx
@mbijon
mbijon / gist:4671581
Last active December 11, 2015 22:39
Symlinks - the Windows version. * Using 'mklink' allows Windows to use git sub-folders in dev server paths
ADD LINK:
mklink /D {local link/folder-name} {full path to resources}
REMOVE LINK (w/o deleting files):
rmdir {folder-name}
@mbijon
mbijon / taxonomy-archive,php
Created January 30, 2013 11:10
WordPress taxonomy archive loop for Amanda CORRECT: while ( $sushi_group_query->have_posts() ) : $sushi_group_query->the_post(); OLD: while ( $sushi_group_query->have_posts() ) : the_post();
<?php
global $wp_query;
$sushi_group_terms = get_terms( 'Sushi Type' );
foreach ( $sushi_group_terms as $sushi_group_term ) {
$taxonomy_term = $sushi_group_term->slug;
$sushi_group_query = new WP_Query( array(
'post_type' => 'sushi',
'tax_query' => array(
array(
@mbijon
mbijon / gist:4678740
Last active December 11, 2015 23:48
Installing MariaDB 5.5 on Ubuntu 12.04
Add MariaDB to your system:
(from: https://downloads.mariadb.org/mariadb/repositories/)
sudo apt-get install python-software-properties
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu precise main'
---
Once the key is imported and the repository added you can install MariaDB with:
@mbijon
mbijon / gist:4701099
Created February 3, 2013 09:52
my.cnf * Percona recommendations for 4CPU, 12Gb server
# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
# Configuration name database generated for mike@etchsoftware.com at 2013-01-31 22:23:13
[mysql]
# CLIENT #
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
@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 / wp_cli_slides.php
Last active December 14, 2015 23:49
WP_CLI slide presentation By Daniel Bachhuber at PDX WordPress Dev Meetup, on March 2013 source: http://danielbachhuber.com/2013/03/11/pdxwp-wp-cli-is-for-wp-devs-on-a-deadline/
<?php
if ( ! defined( 'WP_CLI' ) )
return;
WP_CLI::add_command( 'pdxwp-presentation', 'PDXWP_WP_CLI_Presentation_Command' );
class PDXWP_WP_CLI_Presentation_Command extends WP_CLI_Command {
/**
<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 / gist:5306098
Created April 3, 2013 22:37
New field hardcoded into Custom MetaBox Fields add-on, v0.9.2
case 'layout_chooser':
echo '<ul id="form_template_options" class="">';
$tv_donate_class = new TVDonate;
$tv_views_list = $tv_donate_class->return_tv_views_list();
// Arrays of settings & layouts
include( plugin_dir_path( dirname( dirname( __FILE__ ) ) ) . 'tv-donate-settings.php' );
$tv_views_list = $this->tv_views_list;