Skip to content

Instantly share code, notes, and snippets.

View anthony2025's full-sized avatar
🛵

Anthony Ascencio anthony2025

🛵
View GitHub Profile
// Disable caching so we'll always get the latest comments.
app.use(function(req, res, next) {
res.setHeader('Cache-Control', 'no-cache')
next()
})
export async function fetchJSON(url, options = {}) {
let response = checkResponse(await fetch(url, options))
let data = await response.json()
return data
}
defaults write com.apple.notificationcenterui bannerTime <SECONDS>
# http://editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
const date = new Date().toJSON().slice(0,10)
// 2017-04-30
$ mogrify -path . -resize 1600x1600\> -format jpg *.jpg
# Tip: Keep your master branch pointing at the original repository and make pull requests from branches on your fork. To do this, run:
$ git remote add upstream https://github.com/kentcdodds/glamorous-website.git
$ git fetch upstream
$ git branch --set-upstream-to=upstream/master master
# This will add the original repository as a "remote" called "upstream," Then fetch the git information from that remote, then set your local master branch to use the upstream master branch whenever you run git pull. Then you can make all of your pull request branches based on this master branch. Whenever you want to update your version of master, do a regular git pull.
@anthony2025
anthony2025 / destructuring.js
Created June 19, 2017 03:37 — forked from weslleyaraujo/destructuring.js
Several demos and usages for ES6 destructuring.
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => {
return [1, 2, 3];
const solarized = {
base03: '#002B36',
base02: '#073642',
base01: '#586E75',
base00: '#657B83',
base0: '#839496',
base1: '#93A1A1',
base2: '#EEE8D5',
base3: '#FDF6E3',
yellow: '#B58900',