Skip to content

Instantly share code, notes, and snippets.

View baxang's full-sized avatar

Sanghyun Park baxang

  • Jora
  • Sydney, Australia
View GitHub Profile
@baxang
baxang / smi2srt.py
Created April 3, 2012 17:42
convert script in SMI to SRT format
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@package smi2srt
@brief this module is for convert .smi subtitle file into .srt subtitle
(Request by Alfred Chae)
Started : 2011/08/08
license: GPL
@baxang
baxang / cp.bat
Created August 14, 2012 18:46
A Windows batch file that conveniently uninstalls known malware. From the original post http://goo.gl/NrhST
"%APPDATA%\RapidGet\RPGUnist.exe"
"%PROGRAMFILES%\1410002\unins000.exe"
"%PROGRAMFILES%\365boan\uninst_365boan.exe"
"%PROGRAMFILES%\4shared.com\UNWISE.exe"
"%PROGRAMFILES%\4shared Desktop\uninstall.exe"
"%PROGRAMFILES%\동키호테\uninstall.exe"
"%PROGRAMFILES%\디팝매니저V3\unins000.exe"
"%PROGRAMFILES%\사이트 바로가기\uninst.exe"
"%PROGRAMFILES%\스마트튠\uninst.exe"
"%PROGRAMFILES%\11STshoppingIcon\uninstall.exe"
@baxang
baxang / bootstrap-grid-tn.css.scss
Created March 26, 2014 02:21
Add an additional breakpoint which covers 0..479px to Twitter Bootstrap 3.1.
// Add a breakpoint which covers 0..479px
$screen-tn: 320px !default;
$screen-tn-min: $screen-tn !default;
$screen-tn-max: ($screen-xs-min - 1) !default;
// Additional grid mixins for tn.
@mixin make-tn-column($columns, $gutter: $grid-gutter-width) {
@baxang
baxang / keybase.md
Created June 15, 2016 13:18
keybase.md

Keybase proof

I hereby claim:

  • I am baxang on github.
  • I am baxang (https://keybase.io/baxang) on keybase.
  • I have a public key whose fingerprint is 9C1F 7B6E E604 6351 B910 589E 9148 7D4C 4328 B87E

To claim this, I am signing this object:

@baxang
baxang / get_app_version.rake
Created November 9, 2014 07:50
Read Info.plist and get a version number from a packaged iOS app distribution file(.ipa).
desc "Check binary version."
task :get_ver do
require 'rubygems'
require 'zip'
require 'pathname'
require 'cfpropertylist'
Zip::File.open('build/iPhoneOS-8.0-Release/WH.ipa') do |file|
plist = file.get_entry('Payload/WH.app/Info.plist')
content = CFPropertyList::List.new(format: CFPropertyList::List::FORMAT_BINARY, data: plist.get_input_stream.read)
$ bundle exec compass watch --trace
>>> Change detected at 12:01:38 to: active_admin.css.scss
error app/assets/stylesheets/active_admin.css.scss (Line 13: File to import not found or unreadable: active_admin/mixins.
Load paths:
/Users/shpark/Projects/projectc/app/assets/stylesheets
/Users/shpark/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/compass-0.12.2/frameworks/blueprint/stylesheets
/Users/shpark/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/compass-0.12.2/frameworks/compass/stylesheets
Compass::SpriteImporter)
identical public/stylesheets/active_admin.css
NoMethodError on line ["32"] of /Users/shpark/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/sass-rails-3.2.3/lib/sass/rails/helpers.rb: undefined method `[]' for nil:NilClass
# A formtastic input which incorporates carrierwave uploader functionality.
#
# Intelligently adds the cache field, displays and links to the current
# value if there is one, adds a class to the wrapper when replacing an
# existing value, allows removing an existing value with the checkbox
# taking into account validation requirements.
#
# There are several options:
#
# * Toggle the replacement field with `replaceable: true/false`.
require 'nokogiri'
require 'addressable/uri'
api_key = 'your_key'
uri = Addressable::URI.parse 'http://openapi.epost.go.kr/postal/retrieveLotNumberAdressService/retrieveLotNumberAdressService/getComplexList'
uri.query_values = {
ServiceKey: api_key,
srchwrd: '무악동',
areaNm: '현대아파트',
server {
listen 80;
server_name fast-track.asia www.fast-track.asia fta.seeitworks.asia;
rewrite ^ http://blog.fast-track.asia$request_uri? permanent;
}
@baxang
baxang / gist:4165837
Created November 29, 2012 00:29
Canceling current animation when the mouse pointer hovers on/out quickly.
$('#i-am-an .box').hover(
function(e) {
var t = $(this).find('.drawer');
if (t.is(':animated')) {
t.stop(true, false);
}
t.delay(100).animate({top:'0px'}, 400);
},
function(e) {
var t = $(this).find('.drawer');