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

vim์—์„œ url ์ธ์ฝ”๋”ฉ

๋™๊ธฐ

pr ๊ตฌ๊ฒฝํ•˜๋‹ค ๋‚˜๋นผ๊ณ ๋Š” ๋‹ค๋“ค ์ธ์ฝ”๋”ฉ ์ž˜ํ•ด์„œ ์ œ๋ชฉ๋„ ๋ฒˆ์—ญํ•˜๋Š”๊ตฌ๋‚˜ ์‹ถ์–ด์„œ ์กฐ๊ธˆ ํ•ด๋ณด๊ณ  ์‹ถ์–ด์กŒ๋‹ค.

๊ฒ€์ƒ‰

๋ญ”๊ฐ€ ruby url encoding๋กœ ํ• ๊นŒํ•˜๋‹ค๊ฐ€ ๊ถ…์ด rake๋กœ ๋งŒ๋“ค์–ด๋ด์•ผ ์“ธ์ผ์ด ๋ณ„๋กœ ์—†์„ ๊ฒƒ ๊ฐ™์•„์„œ ๊ทธ๋ƒฅ url encoding์œผ๋กœ ์„ ํšŒ ์›น์—์„œ ๋ณ€ํ™˜ํ•ด์ฃผ๋Š” ์‚ฌ์ดํŠธ๋ฅผ ๋ฐœ๊ฒฌํ–ˆ๋‹ค. ์ƒ๊ฐํ•ด๋ณด๋‹ˆ js์—์„œ๋„ ๋˜๋Š”๊ฑฐ vim์—๋„ ๋ผ์ง€ ์•Š์„๊นŒ ์‹ถ์–ด์„œ ์ฐพ์•„๋ณด๋‹ˆ ์ด๋ฏธ ์žˆ๋‹ค. ๋‚ด๊ฒฝ์šฐ๋Š” ์ด๋ฏธ ์ธ์Šคํ†จ๋„ ํ•ด๋†จ์Œ.

diff --git a/docs/docs/tutorial.md b/docs/docs/tutorial.md
index 3b4d8b2..64470ee 100644
--- a/docs/docs/tutorial.md
+++ b/docs/docs/tutorial.md
@@ -5,7 +5,7 @@ prev: getting-started.html
next: thinking-in-react.html
---
-We'll be building a simple but realistic comments box that you can drop into a blog, a basic version of the realtime comments offered by Disqus, LiveFyre or Facebook comments.
+We'll be building a simple, but realistic comments box that you can drop into a blog, a basic version of the realtime comments offered by Disqus, LiveFyre or Facebook comments.
@marocchino
marocchino / TIL.md
Last active August 29, 2015 14:15
VIM ์ŠคํŽ  ์ฒดํฌ์—์„œ ํ•œ๊ตญ์–ด ์ œ์™ธํ•˜๊ธฐ

VIM ์ŠคํŽ  ์ฒดํฌ์—์„œ ํ•œ๊ตญ์–ด ์ œ์™ธํ•˜๊ธฐ

vim์˜ ์ŠคํŒฐ ์ฒดํฌ๋Š” ๋‚˜ ๊ฐ™์€ ์˜์–ด ๋ชปํ•˜๋Š” ์‚ฌ๋žŒํ•œํ…Œ๋Š” ๋งค์šฐ ์œ ์šฉํ•œ ๊ธฐ๋Šฅ์ด๋‹ค.

๋ฌธ์ œ๋Š” ํ•œ๊ธ€ํŒŒ์ผ์„ ์—ด๋ฉด ์ „๋ถ€ ์˜คํƒ€๋กœ ์ธ์‹ํ•œ๋‹ค๋Š” ๊ฒƒ.

Imgur

์ด๋ ‡๊ฒŒ...

์ฐพ์•„๋ณด๋‹ˆ ๋‚˜ํ•œํ…Œ๋งŒ ๊ทธ๋Ÿฐ ๋ฌธ์ œ๊ฐ€ ์žˆ๋Š” ๊ฒƒ ๊ฐ™์ง€๋Š” ์•Š๋‹ค.

@marocchino
marocchino / TIL.md
Last active August 29, 2015 14:15
๋ฆฌ๋ฒ ์ด์Šค๋œ ๋ฆฌ๋ชจํŠธ ๋ธŒ๋ Œ์น˜ ๊ฐ€์ ธ์˜ค๊ธฐ.

๋ญ ์˜ˆ๋ฅผ ๋“ค์–ด, ํšŒ์‚ฌ ์ปดํ“จํ„ฐ๋กœ ์ž‘์—…ํ•˜๋‹ค force pushํ•˜๊ณ  ์ง‘์— ์™€์„œ ์ž‘์—…์„ ์ด์–ดํ•ด์•ผํ•˜๋Š” ์ƒํ™ฉ์—์„œ ๊ทธ๋ƒฅ ํ‰๋ฒ”(?)ํ•˜๊ฒŒ pullํ•˜๋ฉด ์ปจํ”Œ๋ฆญํŠธ๊ฐ€ ๋‚ฉ๋‹ˆ๋‹ค.

์ด๋Ÿด ๋•Œ๋Š” ์ด๋ ‡๊ฒŒ ํ•˜๋ฉด๋ฉ๋‹ˆ๋‹ค.

git fetch --all
git reset --hard origin/som_work

alias๋„ ๋งŒ๋“ฌ.

@marocchino
marocchino / 094607.md
Last active July 19, 2022 14:25
ES6์‹œ๋Œ€์˜ JavaScript

ES6์‹œ๋Œ€์˜ JavaScript

์•ˆ๋…•ํ•˜์„ธ์š”. ์‚ฌ์›์‚ฌ์—…๋ถ€์˜ ๋งˆ๋ฃจ์•ผ๋งˆ@h13i32maru์ž…๋‹ˆ๋‹ค. ์ตœ๊ทผ์˜ Web ํ”„๋ก ํŠธ์—”๋“œ์˜ ๋ณ€ํ™”๋Š” ๋งค์šฐ ๊ฒฉ๋ ฌํ•ด์„œ, ์กฐ๊ธˆ ๋ˆˆ์„ ๋• ์‚ฌ์ด์— ์ ์  ์ƒˆ๋กœ์šด ๊ฒƒ์ด ๋‚˜์˜ค๊ณ  ์žˆ๋”๋ผ๊ตฌ์š”. ๊ทธ๋Ÿฐ ๊ฒฉ๋ ฌํ•œ ๋ณ€ํ™”์ค‘ ํ•˜๋‚˜๊ฐ€ ES6์ด๋ผ๋Š” ์ฐจ์„ธ๋Œ€ JavaScript์˜ ์‚ฌ์–‘์ž…๋‹ˆ๋‹ค. ์ด ES6๋Š” ํ˜„์žฌ ์žฌ์ •์ค‘์œผ๋กœ ์ง‘ํ•„์‹œ์ ์—์„œ๋Š” Draft Rev31์ด ๊ณต๊ฐœ๋˜์–ด์žˆ์Šต๋‹ˆ๋‹ค.

JavaScript๋Š” ECMAScript(ECMA262)๋ผ๋Š” ์‚ฌ์–‘์„ ๊ธฐ๋ฐ˜์œผ๋กœ ๊ตฌํ˜„๋˜์–ด์žˆ์Šต๋‹ˆ๋‹ค. ํ˜„์žฌ ๋ชจ๋˜ํ•œ Web ๋ธŒ๋ผ์šฐ์ €๋Š” ECMAScript 5.1th Edition์„ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•œ JavaScript์‹คํ–‰ ์—”์ง„์„ ํƒ‘์žฌํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋‹ค์Œ ๋ฒ„์ „์ธ ECMAScript 6th Edition์ด ํ˜„์žฌ ์žฌ์ •์ค‘์œผ๋กœ, ์•ฝ์นญ์œผ๋กœ ES6์ด๋ผ๋Š” ๋ช…์นญ์ด ์‚ฌ์šฉ๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

# This script is used with the Ruby on Rails' new project generator:
#
# rails new my_app -m http://emberjs.com/edge_template.rb
#
# For more information about the template API, please see the following Rails
# guide:
#
# http://edgeguides.rubyonrails.org/rails_application_templates.html
# Install required gems
class User
attr_accessor :age
def initialize
@age = 0
end
def birthday
puts 'happy birthday!'
birthday_act
@age += 1
require 'benchmark'
n = 5_000_000
Benchmark.bm do |x|
x.report { n.times do ; { "x" => 1, "y" => 2}; end }
x.report { n.times do ; { 'x' => 1, 'y' => 2}; end }
end
# first
post "/reservation" do
# get duedate from event
if duedate < Time.now
# submit
else
redirect "/form?error_code=1", 303
end
end
get "/form" do
@marocchino
marocchino / use_whenever_ko.md
Created October 14, 2014 04:13
whenever ์‚ฌ์šฉํ•˜๊ธฐ

whenever ์‚ฌ์šฉํ•˜๊ธฐ

์š”์ฆ˜ ์ด์ชฝ ์งˆ๋ฌธ์ด ๋งŽ์ด ์˜ฌ๋ผ์˜ค๊ธธ๋ ˆ ์ •๋ฆฌํ•ด ๋ดค์Šต๋‹ˆ๋‹ค.

์„ค์น˜

$ gem install whenever

๋ฒˆ๋“ค๋Ÿฌ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๋ฉด, Gemfile์— ์ด๋ ‡๊ฒŒ ์ ๊ณ