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 / pivotal_export.php
Created May 25, 2011 23:37 — forked from anonymous/pivotal_export.php
Expose Mantis bugs for PivotalTracker-import
<?php
/*
Mantis -> PivotalTracker export script
Based on scripts from this support thread:
- http://community.pivotaltracker.com/pivotal/topics/synchronize_pivotal_tracker_with_mantis
To configure:
1.) Put this script in your Mantis root folder (one that contains 'core.php')
2.) Create an "Other" integration in Pivotal
3.) In the integration set a Mantis user/pass that has read rights on the project
@mbijon
mbijon / command.sh
Created October 29, 2011 18:30 — forked from felixge/command.sh
Bash stuff for fighting a weak DOS attack
# Here a few bash one-liners that helped me analyze / fight a weak DOS attack against debuggable.com. Mostly for future reference.
# The attacker was opening lots of tcp connections without sending data, I believe it's called a SYN flood, see: http://tools.ietf.org/html/rfc4987#section-3.2
# Step 0: Check what is going on at port 80
$ netstat -tan | grep ':80 ' | awk '{print $6}' | sort | uniq -c
# Step 1: Increase the number of available fds
$ ulimit -n 32000
# Step 2: Restart your webserver, for me:
@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:
*
@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 / .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
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 / 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/
@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
<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
# 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 );
}