Skip to content

Instantly share code, notes, and snippets.

View marocchino's full-sized avatar
🏠
Working from home (7am~16pm JST)

marocchino

🏠
Working from home (7am~16pm JST)
View GitHub Profile

루비 코드 리딩

뭔가 좀 자기소개가 길다. 6분지났는데 아직 본론도 안들어감

자기 경력 소개 컨퍼런스 다닌거 등등..

이 세션은 기술적인 이야기는 없을거다

  1. 왜 루비 코드를 읽어야 하는가?
def some_method
return false if aaaaaaaaaaaa && bbbbbbbbbbbb
return false if cccccccccccc || dddddddddddd
return false if eeeeeeeeeeee && ffffffffffff
do_something
end
@marocchino
marocchino / a.rb
Created January 28, 2013 14:28
어느게 더 읽기 편함?
def some_method
return false if aaaaaaaaaaaa && bbbbbbbbbbbb
return false if cccccccccccc || dddddddddddd
return false if eeeeeeeeeeee && ffffffffffff
do_something
end
@marocchino
marocchino / rand sort.coffee
Created May 9, 2012 07:41
오브젝트의 가중치에따라 렌덤하게 선택함
banners = [
priority:10
,
priority:10
,
priority:20
,
priority:30
,
priority:40
@marocchino
marocchino / api.js
Created March 20, 2018 19:59
fetch monitor
someQuery(variables, { commit }) {
client.query(query, variables, { commit })
}
@marocchino
marocchino / schema.rake
Created August 28, 2012 08:24
rake db:schema:dump_all
namespace :db do
namespace :schema do
# desc 'Dump all database schema'
task :dump_all => [:environment, :load_config] do
ActiveRecord::Base.configurations.keys.grep(/_development$/).map{|o|o.sub "_development", ""}.each do |name|
begin
filename = "#{Rails.root}/db/#{name}_schema.rb"
File.open(filename, 'w:utf-8') do |file|
ActiveRecord::Base.establish_connection("#{name}_#{Rails.env}")
@marocchino
marocchino / gist:7884710
Created December 10, 2013 02:07
translate to korean apple script
-- ref --
-- http://superuser.com/questions/296421/google-translate-client-for-os-x
-- https://gist.github.com/mayoff/1138816
on run argv
tell application "Google Chrome"
activate
set theUrl to "http://translate.google.com/#en|ko|" & item 1 of argv
if (count every window) = 0 then
@marocchino
marocchino / 12-04.md
Last active April 20, 2016 03:36
커피스크립트에서 바벨로 옮기기
@marocchino
marocchino / Guardfile
Created October 31, 2013 05:24 — forked from thbar/Guardfile
require 'childprocess'
guard 'shell' do
watch %r{^app/(.+)\.rb$} do |m|
`killall rake`
# Why this:
# - spawn a child process to avoid locking Guard
# - make sure that the child process has stdout and stdin otherwise it crashes
# - bonus point: get REPL access in the simulator!
if [[ $BUILD_STATUS == "success" ]]
then
export STATUS="success"
else
export STATUS="failure"
fi
curl "https://api.github.com/repos/justincampbell/my_repo/statuses/$GIT_COMMIT?access_token=abc123" \
-H "Content-Type: application/json" \
-X POST \