Skip to content

Instantly share code, notes, and snippets.

View Rokt33r's full-sized avatar
๐Ÿงจ
BOOM!

Junyoung Choi Rokt33r

๐Ÿงจ
BOOM!
View GitHub Profile
@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

@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:", "\`");
@gaearon
gaearon / slim-redux.js
Last active December 3, 2024 06:34
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@Leko
Leko / 0_profilify.js
Last active August 21, 2017 02:45
Any function profiling
function profilify(fn, label) {
var displayName = label || fn.name,
called = 0,
profilified = function() {
var args = [].slice.call(arguments),
startedAt = new Date(),
defaults = { total: 0, times: 0, average: 0 },
ret;
profilify._stats[displayName] = profilify._stats[displayName] || defaults
@chantastic
chantastic / on-jsx.markdown
Last active November 10, 2024 13:39
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@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์ด๋ผ๋Š” ๋ช…์นญ์ด ์‚ฌ์šฉ๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

@anaisbetts
anaisbetts / analytics.js
Created January 7, 2015 20:47
Google Analytics in Atom Shell
// Pretend that cookies work
(function (document) {
var cookies = {};
document.__defineGetter__('cookie', function () {
var output = [];
for (var cookieName in cookies) {
output.push(cookieName + "=" + cookies[cookieName]);
}
return output.join(";");
});
@branneman
branneman / better-nodejs-require-paths.md
Last active October 18, 2024 20:29
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@gnarf
gnarf / ..git-pr.md
Last active January 27, 2025 01:56
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out