Skip to content

Instantly share code, notes, and snippets.

View gedex's full-sized avatar
🏠
Working from home

Akeda Bagus gedex

🏠
Working from home
View GitHub Profile
#!/bin/sh
SCRIPT_NAME="wpized"
BASE_NAME="wpized_base"
# Location where wpized base is located.
# When there's an update, the compressed file in this URL must be updated.
# @TODO By using automatic build file, i.e Github, we can add VERSION constant
# and append it as suffix of URL_DOWNLOAD.
WPIZED_FILE="wpized_base.tar.gz"
@gedex
gedex / wpized
Created May 12, 2012 10:05
wpized
#!/bin/bash
UNAME=$(uname)
if [ "$UNAME" != "Linux" -a "$UNAME" != "Darwin" ] ; then
echo "Your OS is NOT supported yet."
exit 1
fi
# Find the wpized dir, following one level of symlink. Note that symlink
# can be relative or absolute. Too bad 'readlink -f' is not portable.
@gedex
gedex / Folder Preferences
Created July 12, 2012 09:28 — forked from chrisyour/Folder Preferences
Show hidden files and hidden folders (except .git) in your TextMate project drawer
# Want to show hidden files and folders in your TextMate project drawer? Simple, just modify the file and folder patterns in TextMate's preferences.
# Instructions:
# Go to TextMate > Preferences...
# Click Advanced
# Select Folder References
# Replace the following:
# File Pattern Original
@gedex
gedex / gist:3683204
Created September 9, 2012 07:34
Moving element with key control
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<style>
#arena {
position: relative;
width: 400px;
@gedex
gedex / host
Created December 21, 2012 21:51
script to start UML (User Mode Linux).
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:fc:99:96:e3
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::250:fcff:fe99:96e3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:36311 errors:0 dropped:0 overruns:0 frame:0
TX packets:36902 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24450223 (24.4 MB) TX bytes:6426466 (6.4 MB)
Interrupt:16 Base address:0xe800
@gedex
gedex / gist:4357972
Created December 22, 2012 07:51
PHP make install
Installing PHP SAPI module: cgi
Installing PHP CGI binary: /usr/local/bin/
Installing PHP CLI binary: /usr/local/bin/
Installing PHP CLI man page: /usr/local/man/man1/
Installing build environment: /usr/local/lib/php/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/man/man1/
@gedex
gedex / gist:4361024
Created December 22, 2012 20:53
Installed dirs/files from PHP when building from source. Handy list if you're going to uninstall them since there's no `make uninstall` ATM.
# The leading '>' was added by diff tool
> /home/lang/php
> /home/lang/php/man
> /home/lang/php/man/man1
> /home/lang/php/man/man1/phpize.1
> /home/lang/php/man/man1/php.1
> /home/lang/php/man/man1/php-config.1
> /home/lang/php/bin
> /home/lang/php/bin/phar
@gedex
gedex / gist:4363340
Created December 23, 2012 13:11
What is installed after: apt-get install libjpeg-dev
> /usr/share/doc/libjpeg62
> /usr/share/doc/libjpeg62/README.gz
> /usr/share/doc/libjpeg62/changelog.gz
> /usr/share/doc/libjpeg62/changelog.Debian.gz
> /usr/share/doc/libjpeg62/copyright
> /usr/share/doc/libjpeg62-dev
> /usr/share/doc/libjpeg62-dev/structure.doc.gz
> /usr/share/doc/libjpeg62-dev/libjpeg.doc.gz
> /usr/share/doc/libjpeg62-dev/examples
> /usr/share/doc/libjpeg62-dev/examples/example.c.gz
@gedex
gedex / gist:4363391
Created December 23, 2012 13:22
Installed files after: apt-get install libpng-dev (Debian)
< /lib/libpng12.so.0.44.0
< /lib/libpng12.so.0
< /usr/share/man/man5/png.5.gz
< /usr/share/man/man3/zlib.3.gz
< /usr/share/man/man3/libpng.3.gz
< /usr/share/man/man1/libpng12-config.1.gz
< /usr/share/man/man1/libpng-config.1.gz
< /usr/share/doc/libpng12-dev
< /usr/share/doc/libpng12-dev/examples
@gedex
gedex / phpb
Last active December 29, 2015 10:16
Build multiple PHP versions
#!/bin/bash
#
# Build multiple PHP versions. Inspired by
# http://derickrethans.nl/multiple-php-version-setup.html
# This script assumes you have Git and build tols installed.
#
# Author: Akeda Bagus <admin@gedex.web.id>
# Licensed under MIT license.
# To reduce outgoing request, clone from