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 / 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 / .hound.yml
Created January 6, 2015 03:22
Hound CI configs
ruby:
enabled: true
config_file: config/.rubocop.yml
@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)
@baxang
baxang / rails-remote-form-keep-disabled.js
Created October 24, 2014 11:32
Override Rails' jQuery-ujs default form disable behaviour: Keep the form disabled after a successful submission.
(function($, undefined) {
var $document = $(document);
$document.undelegate($.rails.formSubmitSelector, 'ajax:complete.rails');
$document.delegate($.rails.formSubmitSelector, 'ajax:error.rails', function(event) {
if (this == event.target) $.rails.enableFormElements($(this));
});
})(jQuery);
@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) {
$ 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');