Skip to content

Instantly share code, notes, and snippets.

View kenn's full-sized avatar

Kenn Ejima kenn

View GitHub Profile
redis/
00-RELEASENOTES
BUGS
CONTRIBUTING
COPYING
Changelog
INSTALL
MANIFESTO
Makefile
README
if Rails.env.development?
class Array
def my_method
end
end
end
# Users
users = {}
[
# lib/model_extention.rb
module ModelExtension
extend ActiveSupport::Concern
module ClassMethods
def decode_image_data_url
end
end
end
require 'net/https'
host = 'www.google.com'
port = 443
# http = Net::HTTP.new(host, port)
http = Net::HTTP::Proxy('127.0.0.1', 8888).new(host, port)
http.use_ssl = true
http.start do |conn|
@kenn
kenn / gist:4179656
Created December 1, 2012 00:04
Charles' intercepted SSL certificate
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
01:3b:53:8a:7c:2f
Signature Algorithm: sha1WithRSAEncryption
Issuer: CN=Charles Proxy SSL Proxying, OU=http://charlesproxy.com/ssl, O=XK72 Ltd, L=Auckland, ST=Auckland, C=NZ
Validity
Not Before: Oct 26 00:00:00 2011 GMT
Not After : Sep 30 23:59:59 2013 GMT
@kenn
kenn / gist:4179654
Created December 1, 2012 00:03
Google's SSL Certificate
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
4f:9d:96:d9:66:b0:99:2b:54:c2:95:7c:b4:15:7d:4d
Signature Algorithm: sha1WithRSAEncryption
Issuer: C=ZA, O=Thawte Consulting (Pty) Ltd., CN=Thawte SGC CA
Validity
Not Before: Oct 26 00:00:00 2011 GMT
Not After : Sep 30 23:59:59 2013 GMT
development: &common
mem_limit: 64M
# enable_star: 1
# min_infix_len: 1
# min_word_len: 1
# morphology: none
ngram_len: 1
ngram_chars: "U+4E00..U+9FBB, U+3400..U+4DB5, U+20000..U+2A6D6, U+FA0E, U+FA0F, U+FA11, U+FA13, U+FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27, U+FA28, U+FA29, U+3105..U+312C, U+31A0..U+31B7, U+3040..U+309F, U+30A0..U+30FF, U+31F0, U+31F1, U+31F2, U+31F3, U+31F4, U+31F5, U+31F6, U+31F7, U+31F8, U+31F9, U+31FA, U+31FB, U+31FC, U+31FD, U+31FE, U+31FF, U+AC00..U+D7A3, U+1100..U+1159, U+1161..U+11A2, U+11A8..U+11F9, U+A000..U+A48C, U+A492..U+A4C6"
charset_table: "U+00C0->a, U+00C1->a, U+00C2->a, U+00C3->a, U+00C4->a, U+00C5->a, U+00E0->a, U+00E1->a, U+00E2->a, U+00E3->a, U+00E4->a, U+00E5->a, U+0100->a, U+0101->a, U+0102->a, U+0103->a, U+010300->a, U+0104->a, U+0105->a, U+01CD->a, U+01CE->a, U+01DE->a, U+01DF->a, U+01E0->a, U+01E1->a, U+01FA->a, U+01FB->a, U+0200->a, U+0201->a, U+0202->a, U+0203->a, U+0226->a, U+0227->a, U+023A->a, U+0250->a, U+04D0->a, U+04D1->a, U+1D2C->a, U+
// Sort rooms by drag and drop
$(document).ready(function(){
$('#sortable_rooms').disableSelection()
$('#sortable_rooms').sortable({
axis: 'y',
dropOnEmpty: false,
items: 'li',
opacity: 0.4,
scroll: true,
update: function(){
@kenn
kenn / gist:4091803
Created November 16, 2012 23:15
A proposal for new syntax construct to define errors

When we define an error class in a module, we do one of the following.

module App
  class Error < StandardError; end
  class ServerError < Error; end
  class ClientError < Error; end
end
class << self
def recent
where(...)
end
end
module Scopes
def recent
where(...)
end