Skip to content

Instantly share code, notes, and snippets.

View CheeseStick's full-sized avatar
🧀
Cheese

Jun Jung CheeseStick

🧀
Cheese
View GitHub Profile
@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)를 자바 자료 구조와 라이브러리라는 각도에서 바라보고 있으며, 이는 공유할 정도의 가치는 있을거라 생각했다.

@nemotoo
nemotoo / .gitattributes
Last active April 19, 2024 15:35
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@luciomartinez
luciomartinez / slash.sh
Last active June 1, 2023 08:49
Add or Remove trailing slash in bash
### Add trailing slash if needed
STR="/i/am/a/path"
length=${#STR}
last_char=${STR:length-1:1}
[[ $last_char != "/" ]] && STR="$STR/"; :
echo "$STR" # => /i/am/a/path/
@rizo
rizo / plist-util.md
Last active February 22, 2023 10:04
Convert new plist files between XML and binary

Apple has introduced a new .plist file format in 10.4. You'll notice that you can no longer just edit a .plist file in TextEdit or other text editors. The reason for this is that the files are now binary rather than raw XML.

Luckily for us, there is a command line utility called plutil that can convert back and forth between the two formats. You can convert the .plist file you want to edit to XML format, edit it in TextEdit, then convert back to binary for use. To convert a binary .plist file to XML format for editing, type this in the Terminal:

plutil -convert xml1 some_file.plist

To convert an XML .plist file to binary for use:

plutil -convert binary1 some_other_file.plist
@dctrwatson
dctrwatson / nginx.conf
Last active December 5, 2023 05:07
Caching NPM proxy using Nginx
user www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@jimothyGator
jimothyGator / README.md
Last active March 21, 2024 10:08
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/