Skip to content

Instantly share code, notes, and snippets.

View nacyot's full-sized avatar
🧶
The Science of Hitting

Daegwon Nacyot Kim nacyot

🧶
The Science of Hitting
View GitHub Profile
@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@QuantTraderEd
QuantTraderEd / burger_index.py
Last active December 10, 2017 11:12
Burger Index (py2.7)
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 26 11:10:09 2015
@author: ASSA
"""
import urllib
import urllib2
import json
'use strict';
var page = require('webpage').create();
var system = require('system');
var address;
var output;
if (system.args.length < 3) {
console.log('Usage: rasterize.js [URL|filepath] filename');
phantom.exit(1);
@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이라는 명칭이 사용되고 있습니다.

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@darjeeling
darjeeling / gist:fe58e76e2ed7af6fa1b9
Created January 28, 2015 02:39
starbucks korea store list crawling
#!/usr/bin/env python
import bs4
import requests
import time
def main():
for sido_idx in range(1,18):

I highly suspect that the RSpec core team all use black backgrounds in their terminals because sometimes the colors aren’t so nice on my white terminal

I certainly use a black background. I'm not sure about the other RSpec core folks. Regardless, if there are some color changes we can make that would make output look good on a larger variety of backgrounds, we'll certainly consider that (do you have some suggested changes?). In the meantime, the colors are configurable, so you can change the colors to fit your preferences on your machine. First, create a file at

@hyeshik
hyeshik / 1226 Burger Index.ipynb.json
Last active September 1, 2022 01:36
An IPython notebook for analysis of the distributions of fast-food hamburger shops.
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "",
"signature": "sha256:f99925a6f73a1e36bc91415d84266705e3bdf72304d8dba7bcfb6c94ca7b270a"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
function foo() {
return Function.bind(null,"return bar;");
}
var bar = 1;
(function(){
var bar = 2;
console.log( foo()()() ); // 1 -- but wanted 2 :(
})();
@nateberkopec
nateberkopec / gist:11dbcf0ee7f2c08450ea
Last active March 24, 2023 21:59
RubySpec is dead, long live RubySpec!

Last night, Brian Shirai unilaterally "ended" the RubySpec project, a sub-project of Rubinius (the alternative Ruby implementation which Brian was paid to work on full-time from 2007 to 2013). The blog post describing his reasons for "ending" the project led to a big discussion on Hacker News.

When a single, competing Ruby implementation tells that you its test suite is the One True Way, you should be skeptical. Charles Nutter, Ruby core committer and JRuby head honcho, spent a lot of time last night on Twitter talking to people about what this decision means. He's probably too busy and certainly too nice of a guy to write about what is a political issue in the Ruby community, so I'm going to do it on behalf of all the new or intermediate Rubyists out there that are confused by Brian's decision and what it me