Skip to content

Instantly share code, notes, and snippets.

View serv's full-sized avatar
slow and steady wins the race - jeb

Jason Kim serv

slow and steady wins the race - jeb
View GitHub Profile
serv / h1b-worksite-by-states.json
Last active February 17, 2019 02:23
For more data like this, check out
serv /
Created December 3, 2015 20:54 — forked from lolpack/
Null Response Server
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
#This class will handles any incoming request from
#the browser
class myHandler(BaseHTTPRequestHandler):
#Handler for the GET requests
serv / .md
Last active August 29, 2015 14:07

Canadian consumers need to open their eyes about how their beloved local retailers and their government are guaging them shamelessly. Canada and US has pretty much no difference in infrastructure in transportation, yet Canadian consumers perioidically pay 10% - 20% more than average Americans on consumer goods. Canadians must start demanding to know why this happens from their retailers and governments of all levels.

Whether you like it or not, for vast majority of people, consumption power is THE most important indicator of quality of life, NOT healthcare, NOT social welfare system and NOT even democratic political system. People's ability to buy things at will is what regular people care about the most. And yet, this issue is never on the table. I fail to understand why.

curl -X POST -H "Content-Type: application/json" "localhost:3000/api/v0/links" -d '
"model": {
"title": "Packt Publishing (April 10, 2012)",
"href": "Responsive Web Design with HTML5 and CSS3",
"comment": "1849693188"
class API::V1::BaseController < ApplicationController
skip_before_filter :verify_authenticity_token
before_filter :cors_preflight_check
after_filter :cors_set_access_control_headers
def cors_set_access_control_headers
headers['Access-Control-Allow-Origin'] = '*'
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS'
serv / rails_cors_support_example.rb
Created July 19, 2014 07:11
Example of setting header to support CORS on Rails 4 API server side
module Api
module V0
class LinksController < ApplicationController
before_action :set_headers
def show
@link = Link.find(params[:id])
render json: @link
serv / gist:9151494
Created February 22, 2014 10:07
keybase confirmation
### Keybase proof
I hereby claim:
* I am serv on github.
* I am kim ( on keybase.
* I have the public key with fingerprint 48AF&nbsp;7359&nbsp;91A0&nbsp;5869&nbsp;7322&nbsp;&nbsp;8248&nbsp;5268&nbsp;EC3D&nbsp;C9BF&nbsp;55D6
To claim this, I am signing this object:
serv / application.html.haml
Created August 30, 2013 06:53
Ruby on Rails 4.0 default application.html.erb in .haml format
!!! 5
%title Insert app title here
= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true
= javascript_include_tag "application", "data-turbolinks-track" => true
= csrf_meta_tags
= yield
serv / charicters500.rb
Created July 30, 2013 01:00
Return order and position of the first 'x' charter-length string in 500 character-length string
puts "* * *"
puts "Enter 500 characters"
c500 = gets.chomp
puts "Would you like 4 character window or 8 character window? Type 4 or 8."
window_length = gets.chomp
result = []
window_lengthed_str = c500[0..(window_length.to_i-1)]