- option + space : Alfred2
- commnad + space : Spotlight Search
- right option : A key of changing Korean/English
- caps locks : As control at some programs based emacs
- option + esc : Speak selected text. Configure this in Dictation & Speech.
- control + esc : Search selected text in Dictionary, This is set by BetterTouchTool(instead of control + esc or tabbing by three fingers )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face{ | |
font-family: 'JetBrains Mono'; | |
src: url('https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/JetBrainsMono/Ligatures/Regular/complete/JetBrains%20Mono%20Regular%20Nerd%20Font%20Complete%20Mono.ttf') format('truetype'); | |
font-weight: normal; | |
font-style: normal; | |
} | |
* { | |
-webkit-font-feature-settings: "liga" on, "calt" on; | |
-webkit-font-smoothing: antialiased; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workbench.iconTheme": "vscode-icons", | |
"vim.easymotion": true, | |
"vim.incsearch": true, | |
"vim.useSystemClipboard": true, | |
"vim.useCtrlKeys": true, | |
"vim.hlsearch": true, | |
"vim.insertModeKeyBindings": [ | |
{ | |
"before": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bufferToString = buf => buf.toString('utf-8'); | |
var conv = arr => bufferToString(zlib.gunzipSync(Buffer.from(arr.join(''), 'hex'))); | |
/* testing | |
var res = [ '1f8b0800000000000213', | |
'ab562a4b2d2acecccf2b56b25288562a32d033d03354d25100b10cf50ca02c2338cb18c88a05324bf38a4b12937252e3d352134b4a | |
8b5241daab9572f57212ab2ae373f21353e273537393804603c54b8a4a536b6b01655b8d116a000000' ]; | |
conv(res); // '{"versions": ["r0.0.1", "r0.1.0", "r0.2.0", "r0.3.0"], "unstable_features": {"m.lazy_load_members": true}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Drawing; | |
using System.Drawing.Drawing2D; | |
using System.Drawing.Imaging; | |
using System.IO; | |
using System.Linq; | |
using System.Net; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function countChange(money, coins) { | |
if (money == 0) return 1; | |
if (money < 0 || coins.length == 0) return 0; | |
return countChange(money - coins[0], coins) + countChange(money, coins.slice(1)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def countChange(money: Int, coins: List[Int]): Int = | |
money match { | |
case 0 => 1 // matched, add 1 | |
case n => if (money < 0 || coins.isEmpty) 0 // not matched, ignored | |
else countChange(money - coins.head, coins) + countChange(money, coins.tail) | |
} | |
// test cases | |
assert(calculateCoins(4, List(1,2)) == 3) | |
assert(calculateCoins(300, List(5, 10, 20, 50, 100, 200, 500)) == 1022) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SetEnv GIT_PROJECT_ROOT /opt/git | |
SetEnv GIT_HTTP_EXPORT_ALL | |
ScriptAlias /git/ /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-http-backend/ | |
RewriteEngine On | |
RewriteCond %{QUERY_STRING} service=git-receive-pack [OR] | |
RewriteCond %{REQUEST_URI} /git-receive-pack$ | |
RewriteRule ^/git/ - [E=AUTHREQUIRED] | |
<Files "git-http-backend"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> /(aaa)bbb/.exec("aaabbbccc") // lookbehind? | |
["aaabbb", "aaa"] | |
> /([^a]{3})bbb/.exec("dddbbbeee") // negative lookbehind? | |
["dddbbb", "ddd"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> /bbb(?=ccc)/.exec("aaabbbccc") // lookahead | |
["bbb"] | |
> /bbb(?=ccc)/.exec("dddbbbeee") | |
null | |
> /bbb(?!ccc)/.exec("aaabbbccc") // negative lookahead | |
null | |
> /bbb(?!ccc)/.exec("dddbbbeee") | |
["bbb"] | |
> /(?<=aaa)bbb/.exec("aaabbbccc") // lookbehind? | |
Uncaught SyntaxError: Invalid regular expression: /(?<=aaa)bbb/: Invalid group |
NewerOlder