The Scotch.io public API sits at:
You can filter, sort, and include relationships using query params. There's more docs below but the URL you'll most likely use is:
https://scotch.io/api/f/posts?sort=-published_at&include=author,stats,tags,category
The Scotch.io public API sits at:
You can filter, sort, and include relationships using query params. There's more docs below but the URL you'll most likely use is:
https://scotch.io/api/f/posts?sort=-published_at&include=author,stats,tags,category
| // we have 2 arrays of people | |
| const people = ['chris', 'nick']; | |
| const newPeople = ['holly', 'william']; | |
| // add them together to create a new array | |
| const allPeople = people.concat(newPeople); | |
| // output: ['chris', 'nick', 'holly', 'william'] | |
| console.log(allPeople); |
| const months = ['March', 'April', 'May']; | |
| const otherMonths = ['June', 'July']; | |
| const totalMonths = months.concat(otherMonths); | |
| console.log(totalMonths); |
| const people = ['chris', 'nick', 'holly']; | |
| // find chris | |
| const singlePerson = people.find(name => name === 'chris'); | |
| console.log(singlePerson); | |
| // output: chris |
| const people = [ | |
| { name: 'chris', username: 'chrisoncode' }, | |
| { name: 'nick', username: 'whatnicktweets' }, | |
| { name: 'holly', username: 'hollylawly' }, | |
| ]; | |
| people.find(person => person.name === 'holly'); | |
| // output: { name: 'holly', username: 'hollylawly' } |
| const numbers = [60, 32, 55, 22, 10]; | |
| const lessThan50 = numbers.find(number => number < 50 ); | |
| console.log(lessThan50); | |
| // output: 32 |
| console.log(Array.isArray('one')); // false | |
| console.log(Array.isArray(['thing1', 'thing2'])); // true |
| const names = ['Pete', 'John', 'Mary']; | |
| const isArray = Array.isArray(names); | |
| console.log(isArray); // true |
| # how to run this thingy | |
| # create a file on your mac called setup.sh | |
| # run it from terminal with: sh setup.sh | |
| # heavily inspired by https://twitter.com/damcclean | |
| # https://github.com/damcclean/dotfiles/blob/master/install.sh | |
| # faster dock hiding/showing (run in terminal) | |
| # defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock |
| function toggleMenu () { | |
| ~/.dotfiles/bin/toggleMenuBigSur.sh | |
| } |