Skip to content

Instantly share code, notes, and snippets.

Working from home

Rifki Fauzi kubido

Working from home
Block or report user

Report or block kubido

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kubido /
Created Mar 6, 2017 — forked from andreyvit/
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
kubido / rename.rb
Created Aug 18, 2015
rename list youtube downloaded files
View rename.rb
keyword = "(Part"
files = Dir.entries('.').select{|x| x.include?(keyword)}
files.each do |file|
wor = file.match(/( \()(.+)(?=.mp4)/)[0]
num = wor.match(/([0-9]+)/)[0]
num = (num.to_i < 10)? "#{0}#{num}" : num
new_name = "#{num}. #{file.gsub(wor, '')}"
File.rename(file, "#{Dir.pwd}/#{new_name}")
View youtube2srt_converter.rb
require 'rubygems'
require 'nokogiri'
youtube_xml = ARGV[0]
xml =[0])
srt =[1] || youtube_xml.gsub('.xml', '.srt'), 'w+')
doc = Nokogiri::XML(xml)
doc.children.children.each_with_index do |text, idx|
for i in `seq 1 114`; do
if [ $i -lt 10 ]; then
elif [ $i -lt 100 ]; then
wget "$file.mp3"
kubido / automate daily office workflow
Last active Dec 18, 2015
sometime using foreman in my local machine causing a terminal session reset... so I need to add more tab in terminal window.. and it's pain, I need to add tab.. type the command... wasting time.. so I use this automator script. :)
View automate daily office workflow
tell application "iTerm"
-- buat window baru
set myterm to (make new terminal)
tell myterm
-- perintah2 yang akan di eksekusi tiap di setiap tab
set thelistOfCommands to {"cleopatra && rsd", "satutempat_api && rsd1", "mongoserver", "redis-server", "fake_start"}
View gist:2946744
speed = 3
switch (e.keyCode) {
case 37: // Move Left
$('.dialog').offset({left: $('.dialog').offset().left - speed});
case 39: // Move Right
$('.dialog').offset({left: $('.dialog').offset().left + speed});
kubido / load_jquery
Created Nov 2, 2011
load jquery from chrome console, firebug.. etc
View load_jquery
script = document.createElement("script");
script.setAttribute("src", "");
kubido / scrap_province.js
Created Nov 1, 2011
scrap indonesia province data list from wikipedia, for seed data
View scrap_province.js
// url :
arr = new Array();
// random id from 0 - 5
random_country_id = Math.floor(Math.random() * (5 - 1 + 1) + 1);
$('.wikitable.sortable.jquery-tablesorter tr').each(function(i, tr){
td = $(tr).children()[2]
name = $(td).text();
if(i < 11){
You can’t perform that action at this time.