Skip to content

Instantly share code, notes, and snippets.

@eligrey
eligrey / object-watch.js
Created April 30, 2010 01:38
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
@branneman
branneman / better-nodejs-require-paths.md
Last active April 27, 2024 04:16
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

@thgaskell
thgaskell / README.md
Last active January 18, 2022 10:30
Sequelize + Express Starter Guide
@brcooley
brcooley / api-lolesports-com_docs.md
Last active August 5, 2022 16:35
lolesports.com unofficial api docs

Unofficial documentation

This is an unofficial documentation for the internal lolesports.com api.

This documentation is uncomplete and currently only show all information I got so far. Please help me complete and correct this documentation.

Top level domain

The domain for the intern lolesports.com api is http://api.lolesports.com/api/.

@vasanthk
vasanthk / System Design.md
Last active May 3, 2024 16:37
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@CMCDragonkai
CMCDragonkai / memory_layout.md
Last active April 28, 2024 18:50
Linux: Understanding the Memory Layout of Linux Executables

Understanding the Memory Layout of Linux Executables

Required tools for playing around with memory:

  • hexdump
  • objdump
  • readelf
  • xxd
  • gcore
@Scub3d
Scub3d / api-lolesports-com_docs.md
Last active March 4, 2020 19:49 — forked from brcooley/api-lolesports-com_docs.md
lolesports.com unofficial api docs
@rhostem
rhostem / getByteSize.js
Last active October 22, 2023 05:40
getByteSize.js - string byte 크기 계산
/**
* UTF-8 형식 문자열의 바이트 크기 계산
* UTF-8 문자는 1바이트부터 4바이트를 사용하며 범위별로 다른 비트 패턴을 사용한다.
*
* 유니코드 문자를 UTF-8 형식으로 표현할 때
* 7비트로 표현 가능한 U+0000 ~ U+007F 에 해당하는 문자는 1바이트,
* 11비트 표현 가능한 U+0080 ~ U+07FF 에 해당하는 문자는 2바이트,
* 16비트 표현 가능한 U+0800 ~ U+FFFF 에 해당하는 문자는 3바이트,
* 를 각각 사용한다.
* (4바이트로 표현되는 문자는 거의 사용되지 않으므로 무시한다)
@cecilemuller
cecilemuller / readme.md
Last active March 14, 2022 17:53
Using Three.js "examples" (e.g. OrbitControls) with Webpack 2

Javascript files from the examples folder (such as OrbitControls) are not CommonJS or ES Modules, but they can still be used in Webpack bundles:

In package.json:

"dependencies": {
	"three": "0.84.0",
	"webpack": "2.4.1"
}

Svelte.js

왜 svelte가 Vue 보다 더 좋은가? By John Hannah

  • 내(박성렬)가 Svelte에 관심을 가지게 된 이유.
  • 글이 주장하는 바는 대략 세 가지
    • 구문이 간결하다.
    • Vue보다 빠르다(bootup time, main thread cost)
    • 용량이 Vue보다 적다(total byte weight)