Skip to content

Instantly share code, notes, and snippets.

View firewalker06's full-sized avatar

Didik Wicaksono firewalker06

View GitHub Profile
@firewalker06
firewalker06 / index.html
Created January 12, 2012 02:55
Sample Facebook Open Graph Protocol
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock"/>
<meta property="og:type" content="movie"/>
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
<meta property="og:site_name" content="IMDb"/>
@firewalker06
firewalker06 / gist.js
Created January 12, 2012 03:23
Embed Gist in Tumblr
// Source: http://inparens.tumblr.com/post/1362127815/embedding-github-gists-in-tumblr-posts
var gistPrefix = 'https://gist.github.com/',
// Cache document.write so that it can be restored once all Gists have been
// embedded.
cachedWrite = document.write,
body = $('body'),
// Map each p.gist to an object that contains the paragraph to be replaced
// and the Gist's identifier.
// Modified the p selector, so you don't have to edit in HTML to add class
gists = $('p:contains("https://gist.github.com/")').map(function(n, p) {
@firewalker06
firewalker06 / gist:3244357
Created August 3, 2012 04:27 — forked from searls/gist:1033143
JavaScript example of Gruber's URL matching regex http://daringfireball.net/2010/07/improved_regex_for_matching_urls
//Gruber wrote this regex for matching URLs, but it took a small amount of massage to use it in JavaScript. So here.
//Sauce: http://daringfireball.net/2010/07/improved_regex_for_matching_urls
var p = /\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i;
p.exec('party fun www.twitter.com yay') //winning.
@firewalker06
firewalker06 / gist:4696072
Created February 2, 2013 04:07
Beautify JSON, copied from http://pastebin.com/xB0fG9py
<?php
/**
* @author Marcelius 'mardagz' Dagpin
* @name Beautify JSON
* @copyright 2012
* @uses /
* $json_array = array(
* "name" => "mardagz",
* "gender" => "lalaki po akow hihihi",
* "age" => 40
/**
* iOS 6 style switch checkboxes
* by Lea Verou http://lea.verou.me
*/
:root input[type="checkbox"] { /* :root here acting as a filter for older browsers */
position: absolute;
opacity: 0;
}
@firewalker06
firewalker06 / plugin.js
Last active December 15, 2015 11:19
jQuery Plugin starter
(function( $ ){
$.fn.pluginName = function( ) {
return this.each(function() {
// maintain chainability
});
@firewalker06
firewalker06 / instruction.md
Last active December 15, 2015 12:29
Simplifies your Facebook home
@firewalker06
firewalker06 / readme.md
Last active December 20, 2015 09:39
Tumblr Terminal theme

#Tumblr Terminal Theme

How to use:

  • Open Tumblr.com
  • Customize Theme
  • find "Edit HTML"
  • replace the whole thing with theme.html

Use at your own risk

@firewalker06
firewalker06 / gist:6386059
Created August 30, 2013 03:28
PHP configuration for Laravel 4 using PHPBrew and Homebrew in Mac OSX 10.7+
$ brew update

$ brew install jpeg libpng

$ phpbrew install php-5.4.19 +default+dbs+apxs2=/usr/sbin/apxs +mcrypt+openssl -- --with-libdir=Cellar --with-gd=shared --enable-gd-natf --with-jpeg-dir=/usr/local/Cellar --with-png-dir=/usr/local/Cellar

@firewalker06
firewalker06 / .bash_profile
Created September 25, 2013 01:55
Automatically start ssh-agent and load identity file. Source: http://mah.everybody.org/docs/ssh
SSH_ENV="$HOME/.ssh/environment"
function start_agent {
echo "Initialising new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
/usr/bin/ssh-add;
}