Skip to content

Instantly share code, notes, and snippets.

@ceilwoo
ceilwoo / har_exporter.rb
Last active January 31, 2017 17:42
export har content to separate files
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)
@ceilwoo
ceilwoo / .vimrc
Created November 12, 2015 05:20
simple vimrc
"--------------------------------------------------------------------------------
" Simple Vimrc v1.1
" by ceilwoo@gmail.com
"--------------------------------------------------------------------------------
" 支持中文,无插件
" 适用于命令行vim,gvim,windows,mac os
set number
colorscheme desert
set ignorecase
@ceilwoo
ceilwoo / timer.rb
Created November 11, 2015 03:56
terminal countdown timer
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"