Skip to content

Instantly share code, notes, and snippets.

@soomtong
soomtong / swap-key-guide.sh
Last active September 22, 2017 12:15
Swap modify keys in Linux Ubuntu
// https://www.x.org/archive/X11R6.8.1/doc/xmodmap.1.html
// https://www.linux.com/learn/how-kill-caps-lock-your-linux-desktop
// http://egloos.zum.com/nemonein/v/5222946
$ tail .zshrc
if [[ "$(uname -s)" == "Linux" ]]; then
if [ -x ~/Dropbox/config/tweak/swap_key.sh ]; then
xmodmap ~/Dropbox/config/tweak/swap_key.sh
fi
fi
@ikhoon
ikhoon / learning-shapeless.md
Last active October 18, 2018 08:51
Learning Materials for generic & dependent programming using shapeless
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const url = require("url");
let net = require('net'), fs = require('fs'), os = require('os'), stdin = process.stdin, stdout = process.stdout;
let u = discoverUrl();
let socket = net.Socket();
socket.on('data', (chunk) => {
// send it back to stdout
stdout.write(chunk);
@zaydek-old
zaydek-old / bookmark.min.js
Last active May 28, 2024 19:18
A *simple* CSS debugger. To use, bookmark "Debug CSS" at https://zaydek.github.io/debug.css. Learn more here https://medium.freecodecamp.org/88529aa5a6a3 and https://youtu.be/2QdzahteCCs?t=1m25s (starts at 1:25)
/* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(g):not(path) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; filter: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger();
@gaearon
gaearon / prepack-gentle-intro-1.md
Last active March 22, 2025 07:22
A Gentle Introduction to Prepack, Part 1

Note:

When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
@getify
getify / 1.md
Last active October 15, 2020 01:44
BetterPromise: a strawman experiment in subclassing Promise and "fixing" a bunch of its awkward/bad parts

Some things that are "better" with this BetterPromise implementation:

  • BetterPromise # then(..) accepts a BetterPromise (or Promise) instance passed directly, instead of requiring a function to return it, so that the promise is linked into the chain.

    var p = BetterPromise.resolve(42);
    
    var q = Promise.resolve(10);
    
    p.then(console.log).then(q).then(console.log);

gif-from-tweet

There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.

Dependencies

  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg
@outsideris
outsideris / post.md
Created January 9, 2019 09:45
terraform 글 무단 전제 관련

오늘 어떤 분이(성함을 밝혀도 되는지 몰라서...) 오라클 클라우드 기술 블로그의 글제가 쓴 Terraform 글을 그대로 가져다가 문체만 바꿔서 올렸다는 것을 알게 되었습니다.

당연히 출처표기는 없었고 글의 내용을 확인 결과 제 글을 바탕으로 국문으로 작성한 용어를 영문으로 교체하거나 맞춤법을 교정하거나 반말로 작성한 문장을 존댓말로 바꾸고 일부 내용을 오라클 클라우드에 올렸다는 것을 확인했습니다.

제 글의 내용이 전체 글의 대부분이기 때문에 의도적으로 제 글을 가져가셔 편집 후 직접 작성한 것처럼 보이도록 의도했다고 생각하고 있고 제 글이 CC BY-NC-SA 2.0 라이센스 하에 공개하고 있으므로 이는 라이센스 위반이라고 생각하고 있습니다.

해당 블로그는 오라클 클라우드에 대한 블로그이고 글을 쓰신 "강지선"님도 "한국 오라클의 클라우드 세일즈 컨설팅 팀 소속"이라고 써 있는 것으로 보아 해당 블로그는 한국 오라클에서 운영하는 블로그로 보입니다.

혹시 글이 변경되거나 지워질 지 몰라서 스크린샷을 첨부합니다.

@lifthrasiir
lifthrasiir / daerim.md
Last active May 23, 2019 06:11
<대림동에서 보낸 서른 번의 밤>의 웹 호환성 문제에 대해 (2019-02-03)

아래 내용은 지난 2월 3일 [email protected]에 보낸 메일을 거의 그대로 전재한 것이다. 두 달 넘게 응답은 없었다.

10일 넘게 응답을 받지 못한 뒤 김동인 담당 기자에게 트위터로 연락을 시도했으나 이 또한 응답받지 못했다.

해당 기사는 현재도 여전히 파이어폭스에서 정상적으로 표시되지 않는다. (2019-04-15)

안녕하세요. [<대림동에서 보낸 서른 번의 밤>][1] 기사를 보고 사소하지만 중요할 수 있는 문제를 알려 드리고자 글을 씁니다.

본 기사는 (요즈음에는 뉴욕타임즈 따위가 너무 많이 써서 오히려 식상할 수 있는) 스크롤할 때마다 애니메이션이 튀어 나오는 인터랙티브 포맷을 쓰고 있습니다만, 해당 포맷이 구글 크롬에서만 테스트된 것으로 보입니다. 모든 브라우저를 테스트하진