Skip to content

Instantly share code, notes, and snippets.

View firewalker06's full-sized avatar

Didik Wicaksono firewalker06

View GitHub Profile
@firewalker06
firewalker06 / Html(Rails).sublime-settings
Created March 27, 2014 13:10
User and syntax specifics for Sublime Text
{
// http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html
"tab_size": 2,
"translate_tabs_to_spaces": true
}
@firewalker06
firewalker06 / deletetags
Created September 25, 2013 02:27
Shell Script to delete multiple git tags locally and remotely
#!/bin/bash
git tag -d tag1
git tag -d tag2
git tag -d tag3
git tag push origin :refs/tags/tag1
git tag push origin :refs/tags/tag2
git tag push origin :refs/tags/tag3
@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;
}
@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 / 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 / instruction.md
Last active December 15, 2015 12:29
Simplifies your Facebook home
@firewalker06
firewalker06 / plugin.js
Last active December 15, 2015 11:19
jQuery Plugin starter
(function( $ ){
$.fn.pluginName = function( ) {
return this.each(function() {
// maintain chainability
});
/**
* 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 / 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
@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.