Skip to content

Instantly share code, notes, and snippets.

View AndrewUsher's full-sized avatar
💭
200 OK

Andrew Usher AndrewUsher

💭
200 OK
View GitHub Profile
{
"gatherMode": "navigation",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36",
"environment": {
"networkUserAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4590.2 Mobile Safari/537.36 Chrome-Lighthouse",
"hostUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36",
"benchmarkIndex": 1431,
"credits": {
"axe-core": "4.2.3"
}
@AndrewUsher
AndrewUsher / thi.sh
Created May 17, 2019 18:33
Add JSON File to MongoDB DB
mongoimport --db <db-name> --collection <coll-name> --type json --file file.json
--jsonArray
@AndrewUsher
AndrewUsher / this.sh
Created May 17, 2019 18:25
Git Clone all Repos
CNTX={users|orgs}; NAME={username|orgname}; PAGE=1
curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" |
grep -e 'git_url*' |
cut -d \" -f 4 |
xargs -L1 git clone
@AndrewUsher
AndrewUsher / main.css
Last active May 8, 2019 14:41
AZ LP CSS
[class*="grid-"] {
float: left;
display: block;
padding-left: 1.042%;
padding-right: 1.042%;
min-height: 1px;
position: relative;
width: 100%
}
@AndrewUsher
AndrewUsher / style.css
Created May 2, 2019 00:27
System font stack
body {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}
@AndrewUsher
AndrewUsher / index.js
Created April 29, 2019 18:58
If React Component
const If = ({ children, condition }) => condition && children;
// Usage
/*
<If condition={true}>
This will be rendered.
</If>
<If condition={false}>
This will not be rendered.
</If>

Notes

  • Apple Notes
  • Boostnote
@AndrewUsher
AndrewUsher / .block
Created March 11, 2019 16:08
fresh block
license: mit
@AndrewUsher
AndrewUsher / .block
Last active March 11, 2019 16:36
fresh block
license: mit
@AndrewUsher
AndrewUsher / gist:50ff84016b546d8620215ff6747a00a3
Created February 7, 2018 02:28
console.log rainbow (from Wes Bos)
let x=1,up=!1;setInterval(()=>{(75===x||1===x)&&(up=!up),up?x++:x--,console.log(`%c${`■`.repeat(x)}`,`color: hsl(${2*x}, 100%, 50%)`)},10);