Skip to content

Instantly share code, notes, and snippets.

View yoojinyoung's full-sized avatar
:octocat:
Working in Seoul

Yoo Jin Young yoojinyoung

:octocat:
Working in Seoul
View GitHub Profile
@gaearon
gaearon / modern_js.md
Last active April 18, 2024 15:01
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@redism
redism / kr_won_to_backquote.sh
Created April 26, 2017 16:20
macOS Sierra에서 원화(₩) 대신 백 쿼트(`) 입력하기
#!/bin/bash
if [ -f ~/Library/KeyBindings/DefaultkeyBinding.dict ]; then
echo "~/Library/KeyBindings/DefaultkeyBinding.dict already exists"
exit -1
fi
mkdir -p ~/Library/KeyBindings
cat << EOF > ~/Library/KeyBindings/DefaultkeyBinding.dict
{
"₩" = ("insertText:", "\`");
@RichAyotte
RichAyotte / create-tables.js
Created April 11, 2014 17:35
Initial Sequelize Migration with existing database.
// Inspired by http://bulkan-evcimen.com/using_sequelize_migrations_with_an_existing_database
var Promise = require('bluebird');
var fs = Promise.promisifyAll(require('fs'));
module.exports = {
up: function(migration, DataTypes, done) {
var db = migration.migrator.sequelize;
fs.readFileAsync(__dirname + '/initial.sql', {encoding: 'utf8'})
.then(function(initialSchema) {
var tables = initialSchema.split(';');
@vitan
vitan / load_csv_dict
Created January 20, 2015 08:01
How to load .csv as dict in Python, skipping initial space and quotechar
#!/usr/bin/env python
"""
Given file example.csv, with the following contents:
key1: 'I am value1'
key2: 'I am value2'
"""
import csv