Skip to content

Instantly share code, notes, and snippets.

View heruputra's full-sized avatar
🌴
On vacation

Heru Hang Tryputra heruputra

🌴
On vacation
  • Yogyakarta, Indonesia
View GitHub Profile
@heruputra
heruputra / imgcmp.py
Created October 8, 2016 19:23 — forked from attilaolah/imgcmp.py
Fast image comparison with Python
import math
import Image
import Levenshtein
class BWImageCompare(object):
"""Compares two images (b/w)."""
_pixel = 255
@heruputra
heruputra / default.conf
Created August 3, 2016 09:10 — forked from cbmd/default.conf
nginx config - dynamic virtual hosts
server {
index index.php;
set $basepath "/var/www";
set $domain $host;
# check one name domain for simple application
if ($domain ~ "^(.[^.]*)\.dev$") {
set $domain $1;
set $rootpath "${domain}";
@heruputra
heruputra / upgrade-everything.sh
Created February 21, 2016 14:45 — forked from mul14/upgrade-everything.sh
Upgrade Everything
#!/usr/bin/env sh
sh $HOME/.oh-my-zsh/tools/upgrade.sh
pip3 install --upgrade pip
pip3 freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U
pip2 install --upgrade pip
pip2 freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip2 install -U
@heruputra
heruputra / gist:346c747d06506a272b8c
Created April 2, 2015 05:37
Graphic Designer Vacancy at Geek Garden

Graphic Designer

Graphic Designers at Geek Garden will work in the design and development of various digital design, including websites, landing pages, advertisements, emails, and other lead generation assets.

About you

  • Love to work in dynamic and high growth startup environment
  • Have excellent time management skills and the ability to prioritize efficiently
  • Are a clear communicator
  • Passionate about learning and staying up to date with the latest technologies
  • Have a positive attitude
@heruputra
heruputra / gist:200cb46116486a3781ec
Last active August 29, 2015 14:18
Web Engineer Vacancy at Geek Garden

Web Engineer

Web Engineers at Geek Garden will design and build across our products and projects.

About you

  • Love to work in dynamic and high growth startup environment
  • Want to develop something with a lasting impact.
  • Have excellent time management skills and the ability to prioritize efficiently.
  • Are a clear communicator
  • Passionate about learning and staying up to date with the latest technologies
  • Have a positive attitude
@heruputra
heruputra / deploy.rb
Last active August 29, 2015 14:17 — forked from mul14/deploy.rb
require 'mina/git'
# Fix the SSH password prompt problem
set :term_mode, nil
# Basic settings:
# domain - The hostname to SSH to.
# deploy_to - Path to deploy into.
# repository - Git repo to clone from. (needed by mina/git)
# branch - Branch name to deploy. (needed by mina/git)
@heruputra
heruputra / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php namespace Smile\Services\Creators;
use Illuminate\Validation\Factory as Validator;
abstract class Creator implements CreatorInterface
{
protected $model;
protected $errors;
sudo apt-get update
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
sudo apt-get install -y vim curl python-software-properties
sudo add-apt-repository -y ppa:ondrej/php5
sudo apt-get update
sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php5-readline mysql-server-5.5 php5-mysql git-core php5-xdebug