Skip to content

Instantly share code, notes, and snippets.

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

Khairul kahirul

🏠
Working from home
View GitHub Profile
@kahirul
kahirul / meow.sh
Last active August 29, 2015 14:13
Custom Presto Prompt
#
# A simple theme that displays relevant, contextual information.
#
# Authors:
# Sorin Ionescu <[email protected]>
#
# Screenshots:
# http://i.imgur.com/nBEEZ.png
#
@kahirul
kahirul / dashed-partial-name
Created December 18, 2014 05:18
Regex to find call for rendering partial with dash in file name, e.g. render "some-partial"
/render\s+["'a-z]+\/[a-z]+\-[a-z]+/i
@kahirul
kahirul / rvm-setup.md
Created September 25, 2014 10:11
Setup RVM
curl -sSL https://get.rvm.io | sudo bash -s stable
usermod -a -G rvm jerry
source /etc/profile.d/rvm.sh
#! /bin/sh
# Base on Gitlab. [email protected]
# GITLAB
# Maintainer: @randx
# Authors: [email protected], @randx
# App Version: 6.0
### BEGIN INIT INFO
@kahirul
kahirul / ceil_by_factor.rb
Created November 28, 2012 10:33
Custom ceiling
# Custom ceiling function
# Usage : If we want to ceil number by 50, it will ceil last two digit of the number into
# 0 -> 0
# (1..49) --> 50
# 50 --> 50
# (51..99) --> 100
# 123 --> 150
# Then use ceil_by_factor(number, 50)
# ceil_by_factor(123, 100) -> 200