Skip to content

Instantly share code, notes, and snippets.

View tsaiDavid's full-sized avatar
⌨️
:imap kj <Esc>

David Tsai tsaiDavid

⌨️
:imap kj <Esc>
View GitHub Profile
@tsaiDavid
tsaiDavid / custom.css
Created March 16, 2018 17:03
Slack Custom CSS
/*
Copyright 2017 Bryan Keller (https://github.com/widget-)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
Verifying my Blockstack ID is secured with the address 1MXeEmZ9oV6aPG9bkoumg9XthxJRxhgfC9 https://explorer.blockstack.org/address/1MXeEmZ9oV6aPG9bkoumg9XthxJRxhgfC9
@tsaiDavid
tsaiDavid / 101315-nQueens-bitwise.js
Created October 13, 2015 20:03
nQueens Solution written with bitwise operators
function N(n) {
function Hack(R, e, a, c, t, o, r) {
for (t = ~ (R | e | a) & c; t > 0;)
t ^= o = t & -t, r += Hack(R | o, (e | o) >> 1, (a | o) << 1, c, 0, 0, 0);
return R == c && r++, r
}
return Hack(0, 0, 0, (1 << n) - 1, 0, 0, 0)
};