Instantly share code, notes, and snippets.

View long-tern.js
// style 1
const blah = A ? B : C ? D : E ? F : G;
// style 2
const blah = A
? B
: C
? D
: E
? F
View fetchUTC.js
/**
* Returns UNIX time in milliseconds.
*/
async function fetchUTC({
timeout = 10000,
shouldCompensate = true // subtracts half of the xhr request time from the time extracted from page
}={}) {
const servers = [
{
View codebox.css
.App {
font-family: sans-serif;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
}
.CardsContainer {
height: 200px;
View macos_node_setup.md
~/.bash_profile
open ~/.bash_profile
brew link node@8
brew link node
cat ~/.bash_profile
echo 'export PATH="/usr/local/opt/node@8/bin:$PATH"' >> ~/.bash_profile
ls /usr/local/opt/node\@8/bin/
vim ~/.bash_profile 
View install-github-branch.md

npm i github:rajsuvariya/autocompletetextview#development

View gist:fdeacf470d9f9378baaf1d19ef973c09
The executable was signed with invalid entitlements.
The entitlements specified in your application’s Code Signing Entitlements file are invalid, not permitted, or do not match those specified in your provisioning profile. (0xE8008016).
View isPlainObjectAlt.js
export default function isPlainObject(obj) {
if (typeof obj !== 'object' || obj === null) return false
let proto = obj
while (Object.getPrototypeOf(proto) !== null) {
proto = Object.getPrototypeOf(proto)
}
return Object.getPrototypeOf(obj) === proto
}
View npm i from branch.txt
npm i github:Noitidart/react-native-dialogs#patch-4
View gist:eb7035d55db6134b063e57528191e31f
@@||bestarticles.me^$generichide
@@||tellycolors.me^$generichide
||openx.pm^