Skip to content

Instantly share code, notes, and snippets.

Avatar

Ceil ceilwoo

View GitHub Profile
@ceilwoo
ceilwoo / timer.rb
Created Nov 11, 2015
terminal countdown timer
View timer.rb
require 'time'
countdown_time = ARGV[0]
puts "-- Input Countdown time: XX:XX:XX ---" if !countdown_time
t = Time.parse(countdown_time)
seconds = (t.hour * 60 * 60 + t.min * 60 + t.sec).to_i
while (seconds!=0) do
print " " + Time.at(seconds).utc.strftime("%H:%M:%S")
print "\r"
@ceilwoo
ceilwoo / .vimrc
Created Nov 12, 2015
simple vimrc
View .vimrc
"--------------------------------------------------------------------------------
" Simple Vimrc v1.1
" by ceilwoo@gmail.com
"--------------------------------------------------------------------------------
" 支持中文,无插件
" 适用于命令行vim,gvim,windows,mac os
set number
colorscheme desert
set ignorecase
@ceilwoo
ceilwoo / har_exporter.rb
Last active Jan 31, 2017
export har content to separate files
View har_exporter.rb
require 'cgi'
require 'json'
require 'base64'
require 'uri'
require 'fileutils'
@type = ["text","application/ogg", "image", "application/octet-stream"]
file_path = ARGV[0]
if !file_path || !File.exist?(file_path)
You can’t perform that action at this time.