Skip to content

Instantly share code, notes, and snippets.

View dongjinahn's full-sized avatar
💭
⛄️

Dong-jin Ahn dongjinahn

💭
⛄️
View GitHub Profile
@rollin96
rollin96 / jupyter_matplotlib_korean_font
Created May 8, 2018 07:58
jupyter에서 matplotlib를 위해 한글폰트를 가져다 쓰는 방법.
# 1: 한글을 그냥 써보면 박스만 그려짐.
import matplotlib.pyplot as plt
plt.text(0.5, 0.5, ['한글', 'test'])
plt.show()
# 2: 아래와 같이 설정해주면 한글이 잘 동작함.
# ㄴ 시스템에 install이 잘 되어 있다면 mpl.rcParams[] 설정만 하면 되는데, docker에 띄운 jupyter에서는 왠지 apt-get으로 설치한 font를 인식하지 못한다.
import matplotlib as mpl
import matplotlib.font_manager as fm
@rawrmaan
rawrmaan / killglobals.sh
Created April 19, 2017 21:19
Kill React Native typings globals so we can use node globals too
#!/usr/bin/env bash
ed -s ./node_modules/@types/react-native/index.d.ts <<< $',s/declare global/declare namespace FuckGlobals/g\nw'
@jooyunghan
jooyunghan / monad-in-java.md
Last active November 17, 2023 04:54
한글번역 - Functor and monad examples in plain Java

Functor and monad examples in plain Java

이 글은 우리가 쓴 책, 'Reactive Programming with RxJava' 의 부록이었다. Reactive programming과 관련이 깊은 주제긴 하지만 모나드를 소개한다는 게 책과 썩 어울리지는 않았다. 그래서 나는 따로 블로그에 올리기로 했다. 프로그래밍을 다루는 블로그에서 *"반은 맞고 반은 틀릴 지 모르는 나만의 모나드 설명"*이란 것이 새로운 *"Hello World"*라는 점을 나도 잘 안다. 하지만 이 글은 펑터(functor)와 모나드(monad)를 자바 자료 구조와 라이브러리라는 각도에서 바라보고 있으며, 이는 공유할 정도의 가치는 있을거라 생각했다.

@squarism
squarism / iterm2.md
Last active May 4, 2024 13:06
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@matthewmueller
matthewmueller / escape-json.js
Created August 25, 2012 02:50
Escape JSON strings before trying to run JSON.parse
/*
Escape JSON
*/
var escapeJSON = exports.escapeJSON = function(json) {
var escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
var meta = { // table of character substitutions
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',