Skip to content

Instantly share code, notes, and snippets.

View williamn's full-sized avatar

William williamn

  • Jakarta, Indonesia
View GitHub Profile
@staltz
staltz / introrx.md
Last active May 6, 2024 01:44
The introduction to Reactive Programming you've been missing
@sloria
sloria / bobp-python.md
Last active May 1, 2024 08:37
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@fny
fny / imagemagick_fix_for_rmagick.sh
Last active July 27, 2020 01:20
OS X shell script to fix RMagick compilation issues when using Homebrew's ImageMagick installation. This script will create the symlinks needed for RMagick to compile. Quantum depths of 8 and 16-bits supported.
#! /bin/sh
#
# An OS X shell script to fix RMagick compilation issues when using Homebrew's
# ImageMagick installation. This script creates the symlinks needed for
# RMagick to compile. Quantum depths of 8 and 16-bits are supported.
#
# You can run this script with "sh whatever_script_name.sh" in your terminal
# or with a click if you change the file extension to "command".
#
# You can manually make the links by visiting the ImagicMagick library
@zenorocha
zenorocha / README.md
Last active April 6, 2024 16:59
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@coffeencoke
coffeencoke / README.md
Last active May 19, 2017 08:02
Use a sub directory as a rails application's url root rails 3, nginx, unicorn

Symlink for static files

Among applying the changes in the other files in this gist, you need to symlink the directory you are serving the app with in the root app's public directory so that NGINX can serve the static files in the sub-app.

For example, if you have an app at /home/coffeencoke/apps/app.coffeencoke.com/current/public as your root app, and you have the sub app served at http://app.coffeencoke.com/admin, then you need to symlink /home/coffeencoke/apps/admin-app.coffeencoke.com/current/public to /home/coffeencoke/apps/app.coffeencoke.com/current/public/admin like so:

ln -s /home/coffeencoke/apps/admin-app.coffeencoke.com/current/public /home/coffeencoke/apps/app.coffeencoke.com/current/public/admin
@KartikTalwar
KartikTalwar / Documentation.md
Last active April 13, 2024 23:09
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@bobmagicii
bobmagicii / gist:3180599
Created July 26, 2012 06:35
Apache log in JSON format...
LogFormat "{ \"Time\":%{%s}t, \"RemoteIP\":\"%a\", \"Host\":\"%V\", \"Port\":\"%p\", \"Request\":\"%U\", \"Query\":\"%q\", \"File\":\"%f\", \"Method\":\"%m\", \"Status\":\"%s\", \"UserAgent\":\"%{User-agent}i\", \"Referer\":\"%{Referer}i\" }" jsonlog
CustomLog "/var/log/apache2/access-json.log" jsonlog
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname