Skip to content

Instantly share code, notes, and snippets.

View keikun17's full-sized avatar

Cakey | Buddy Magsipoc keikun17

View GitHub Profile
// a bit of context here, obj will be an input field object that is rendered by an 'in-place' edit feature
obj = $("#environment_233 input").first()
// [<input id="regression_test_environment[name]" name="regression_test_environment[name]" style type="text" value="iii">]
obj
// [<input id="regression_test_environment[name]" name="regression_test_environment[name]" style type="text" value="iii">]
obj.attr('name')
// "regression_test_environment[name]"
@keikun17
keikun17 / toggle powerline solarized-light
Created September 17, 2012 04:45
Toggle Powerline (Solarized light)
" ======== Glorious background toggling ========
" requires solarizedLightLC theme from : https://github.com/pearofducks/vim-powerline/blob/develop/autoload/Powerline/Colorschemes/solarizedLightLC.vim
" put this theme under this directory : ~/.yadr/vim/bundle/skwp-vim-powerline/autoload/Powerline/Colorschemes/
let g:powerline_dark_theme = 'skwp'
let g:powerline_light_theme = 'solarizedLightLC'
function! EmoModeOn()
set background=dark
let g:Powerline_colorscheme = g:powerline_dark_theme
endfunction
def tag_list=(tags_string, current_user)
self.taggings.destroy_all
tag_names = tags_string.split(",").collect{|s| s.strip.downcase}.uniq
tag_names.each do |tag_name|
tag = current_user.tags.find_or_create_by_name(tag_name)
tagging = self.taggings.new # <= code smell
tagging.tag_id = tag.id # <= code smell
end
@keikun17
keikun17 / gist:4133510
Created November 23, 2012 01:00
Lean Passing

Subject name : Differential Equations

Estimated # of quizzes this term : 3

Estimated # of HWs this term : 4

Passing rate : 70

@keikun17
keikun17 / gist:4983271
Created February 19, 2013 05:11
Razer blade specs
Processor
   Intel® Core™ i7
   Quad Core Processor with Hyper-Threading
   CPU: 2.2GHz (Base) / 3.2GHz (Turbo)
Chipset
   Intel® HM77 Express Chipset
@keikun17
keikun17 / gist:5027688
Last active December 14, 2015 04:19
jruby 1.6.8 + gem 2.0.0 problem with 'gem install'
$ jruby -v
jruby 1.6.8 (ruby-1.8.7-p357) (2012-09-18 1772b40) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_02) [linux-amd64-java]
$ jruby -S gem --version
2.0.0
$ jruby -S gem install jruby-openssl
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
ERROR: Loading command: install (LoadError)
@keikun17
keikun17 / gist:5054019
Last active December 14, 2015 07:58
Dorama chekurisuto

Buddy's Guide to Tech Drama

I. vim vs emacs

II. ruby vs python

III. coffeescript vs javascript

  • Stage 1 : Damage Control
    • Person A : CS sucks, useless abstraction. QQ.
    • Person B : CS is a tool, preference blabla!
    • Person A : CS still suck!
PhRUG Celebrity Names
Ricky Sta Cruz
Byron Bibat
Terry Ponce
Francis Magsipoc (aka Francis M)
Florence Magsipoc
Elmer Gaspar
Error Fornoles
Raymond Tayag
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
@keikun17
keikun17 / gist:5283151
Created April 1, 2013 03:45
Walked right into it...
Bad news: Sigh... Mitch and I are going through some really tough times right now...
but it's alright, we still have each other.
It's times like these that we get to appreciate the small stuff in life...
I will be selling stuff starting with my PC (specs below). 5,000 pesos...
pls pm me for details...
AMD FX-8350 4.0GHz 8-Core
Corsair H100i 77.0 CFM Liquid
Arctic Cooling MX-2 65g
Asus Crosshair V Formula-Z ATX AM3+