Skip to content

Instantly share code, notes, and snippets.

View cheeyeo's full-sized avatar
💭
Researching on use of transformers in computer vision

Chee Yeo cheeyeo

💭
Researching on use of transformers in computer vision
View GitHub Profile
@cheeyeo
cheeyeo / Gemfile
Last active August 29, 2015 14:13 — forked from mattbrictson/Gemfile
gem 'dragonfly', '~>0.9.4'
group :production do
gem 'fog' # for Amazon S3
end
@cheeyeo
cheeyeo / keybase.md
Last active August 29, 2015 14:12 — forked from ismasan/keybase.md

Keybase proof

I hereby claim:

  • I am ismasan on github.
  • I am ismasan (https://keybase.io/ismasan) on keybase.
  • I have a public key whose fingerprint is 3E67 5E59 B46D D332 2669 6883 2AA1 2B6D 5825 B214

To claim this, I am signing this object:

@cheeyeo
cheeyeo / Procfile
Last active August 29, 2015 14:12 — forked from jbhannah/Procfile
web: bundle exec puma -p $PORT config.ru
@cheeyeo
cheeyeo / test.exs
Last active September 25, 2022 19:56
Example of mocking a web api in ExUnit in Elixir using Meck
# https://github.com/eproxus/meck
# add meck as a dependency in mix.exs
defmodule GithubIssuesTest do
use ExUnit.Case
import :meck
setup_all do
new(Issues.GithubIssues)
on_exit fn -> unload end
@cheeyeo
cheeyeo / proxy.rb
Last active August 29, 2015 14:10 — forked from torsten/proxy.rb
#!/usr/bin/env ruby
# A quick and dirty implementation of an HTTP proxy server in Ruby
# because I did not want to install anything.
#
# Copyright (C) 2009-2014 Torsten Becker <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
@cheeyeo
cheeyeo / install.md
Created October 28, 2014 21:25
nokogir install for homebrew 0.9.4 and os x lion
#!/usr/bin/env ruby
cmd = %q[echo '3...'; sleep 1;
echo '2...'; sleep 1;
echo '1...'; sleep 1;
echo 'Liftoff!']
puts '------ beginning command ------'
output_log = []
IO.popen(cmd).each do |line|
# blog post: http://blog.slashpoundbang.com/post/1455548868/memcachemodel-make-any-ruby-object-that-persists-in
# No transactions or exceptions (yet).
module MemcacheModel
def self.included(base)
base.class_eval do
extend ActiveModel::Naming
extend ActiveModel::Translation
extend ActiveModel::Callbacks
extend MemcacheModel::ClassMethods
@cheeyeo
cheeyeo / railssolo.rb
Created September 26, 2014 18:55
Reproduction of strong_parameters error with file upload
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', path: '~/code/rails'
gem 'arel', github: 'rails/arel'
gem 'rack', github: 'rack/rack'
gem 'i18n', github: 'svenfuchs/i18n'
GEMFILE
system 'bundle'