Skip to content

Instantly share code, notes, and snippets.

View Choongkyu's full-sized avatar

Choongkyu Kim Choongkyu

View GitHub Profile
@Choongkyu
Choongkyu / 0-startup-overview.md
Created June 14, 2021 07:34 — forked from dideler/0-startup-overview.md
Startup Engineering notes
class Solution:
def titleToNumber(self, s: str) -> int:
out = 0
for i, ch in enumerate(s):
v = ord(ch) - 64
place = len(s) - i - 1
out += (v * 26**place)
return out
@Choongkyu
Choongkyu / install-kubernetes-archlinux.md
Created February 22, 2020 23:22 — forked from StephenSorriaux/install-kubernetes-archlinux.md
Install Kubernetes on bare-metal ArchLinux host

Installing Kubernetes on ArchLinux

Packages

pacman -S curl docker ebtables ethtool wget unzip

Also cfssl is needed but available on AUR, using pacaur

pacaur -S cfssl
@Choongkyu
Choongkyu / install-kubernetes-archlinux.md
Created February 22, 2020 23:22 — forked from StephenSorriaux/install-kubernetes-archlinux.md
Install Kubernetes on bare-metal ArchLinux host

Installing Kubernetes on ArchLinux

Packages

pacman -S curl docker ebtables ethtool wget unzip

Also cfssl is needed but available on AUR, using pacaur

pacaur -S cfssl
@Choongkyu
Choongkyu / redis.sh
Created November 16, 2017 21:19 — forked from pbrisbin/redis.sh
Redis cheat-sheet (gist mirror of something on pastebin.com)
# Connect to a server
redis-cli server
# Make an insert
set key value
# Make multiple insert
@Choongkyu
Choongkyu / master gemfile.lock with guard
Created July 15, 2015 04:16
gemfile.lock comparison
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.2)
actionpack (= 4.2.2)
actionview (= 4.2.2)
activejob (= 4.2.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.2)
@Choongkyu
Choongkyu / gist:29d00385ee39c4e7eb24
Created July 15, 2015 04:00
bundle exec rake test error
zebralight1@sample_app:~/workspace (master) $ bundle exec rake test
/usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- guard (LoadError)
from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `block in require'
from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:240:in `load_dependency'
from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require'
from /usr/local/rvm/gems/ruby-2.2.1/gems/guard-minitest-2.4.4/lib/minitest/guard_minitest_plugin.rb:4:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `require'
from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:274:in `block in require'
from /usr/local/rvm/gems/ruby-2.2
@Choongkyu
Choongkyu / ViewController.h
Created March 6, 2015 22:48
uiwebview test
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (weak, nonatomic) IBOutlet UIWebView *myWebView;
- (IBAction)refreshButton:(UIButton *)sender;
@end
@Choongkyu
Choongkyu / _form.html.erb
Last active August 29, 2015 14:07
states
<%= form_for(@business) do |f| %>
<% if @business.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@business.errors.count, "error") %> prohibited this business from being saved:</h2>
<ul>
<% @business.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
@Choongkyu
Choongkyu / gist:20f88e71c63da91398ce
Last active August 29, 2015 14:07
article id and id showing reverse of what rails console shows
ActiveRecord::RecordNotFound in CommentsController#destroy
Couldn't find Comment with 'id'=6 [WHERE "comments"."article_id" = ?]
Extracted source (around line #35):
33
34
35
36
37
38