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
@gedex
gedex / pythonb
Created December 24, 2012 20:42
Build multiple Python versions.
#!/bin/bash
#
# Build multiple Python versions.
#
# Author: Akeda Bagus <[email protected]>
# Licensed under MIT license.
BASE_URL=http://python.org/ftp/python/
CURRENT_DIR=$(pwd)
# This is where all python version will be built
@gedex
gedex / nginx
Created December 28, 2012 06:14
Ubuntu's nginx-initscript
#!/bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@gedex
gedex / gist:4395644
Created December 28, 2012 07:56
My debian's nginx-initscript
#!/bin/sh
### BEGIN INIT INFO
# Provides: nginxs
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: nginx init.d initscript for Debian Squeeze
# Description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server. This script \
#!/usr/bin/env python
import string
import sys
from collections import Counter
ALPHABET = string.ascii_lowercase
def main():
#!/usr/bin/env python
from sys import stdin
def next(a, i):
j = i
l = len(a)
r = i - 1
while j < l and a[j]:
@gedex
gedex / config.ru
Created February 12, 2013 06:49
rack-based static webserver
use Rack::Static,
:urls => ["/images", "/js", "/css"],
:root => "public"
# Absolute path of the root app
@root = File.expand_path(File.join(File.dirname(__FILE__), 'public'))
run lambda { |env|
req = Rack::Request.new(env)
@gedex
gedex / frontendDevlopmentBookmarks.md
Created June 27, 2013 17:58 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@gedex
gedex / post-474.json
Created April 11, 2014 12:36
Test a single integration post
{"ID":474,"post_author":"1","post_date":"2014-04-11 12:35:50","post_date_gmt":"2014-04-11 12:35:50","post_content":"asdasdf","post_title":"Test a single integration post","post_excerpt":"","post_status":"publish","comment_status":"open","ping_status":"open","post_password":"","post_name":"test-a-single-integration-post","to_ping":"","pinged":"","post_modified":"2014-04-11 12:37:38","post_modified_gmt":"2014-04-11 12:37:38","post_content_filtered":"","post_parent":0,"guid":"http:\/\/local.wordpress.dev\/?p=474","menu_order":0,"post_type":"post","post_mime_type":"","comment_count":"0","filter":"raw","ancestors":[],"post_category":[1],"tags_input":[]}
@gedex
gedex / post-479.json
Created April 11, 2014 12:43
Test New Post to Broadcast
{"ID":479,"post_author":"1","post_date":"2014-04-11 12:43:37","post_date_gmt":"2014-04-11 12:43:37","post_content":"This is a test","post_title":"Test New Post to Broadcast","post_excerpt":"","post_status":"publish","comment_status":"open","ping_status":"open","post_password":"","post_name":"test-new-post-to-broadcast","to_ping":"","pinged":"","post_modified":"2014-04-11 12:43:37","post_modified_gmt":"2014-04-11 12:43:37","post_content_filtered":"","post_parent":0,"guid":"http:\/\/local.wordpress.dev\/?p=479","menu_order":0,"post_type":"post","post_mime_type":"","comment_count":"0","filter":"raw","ancestors":[],"post_category":[1],"tags_input":[]}
@gedex
gedex / post-482.json
Created April 11, 2014 12:51
Awesome post to publish
{"ID":482,"post_author":"1","post_date":"2014-04-11 12:51:06","post_date_gmt":"2014-04-11 12:51:06","post_content":"Yaya","post_title":"Awesome post to publish","post_excerpt":"","post_status":"publish","comment_status":"open","ping_status":"open","post_password":"","post_name":"awesome-post-to-publish","to_ping":"","pinged":"","post_modified":"2014-04-11 12:51:06","post_modified_gmt":"2014-04-11 12:51:06","post_content_filtered":"","post_parent":0,"guid":"http:\/\/local.wordpress.dev\/?p=482","menu_order":0,"post_type":"post","post_mime_type":"","comment_count":"0","filter":"raw","ancestors":[],"post_category":[1],"tags_input":[]}