This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Actions\Bento; | |
use Exception; | |
use Illuminate\Support\Facades\Http; | |
use Illuminate\Support\Facades\Log; | |
use Lorisleiva\Actions\Concerns\AsAction; | |
class TrackBentoEvent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toggleMenu () { | |
~/.dotfiles/bin/toggleMenuBigSur.sh | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const names = ['Pete', 'John', 'Mary']; | |
const isArray = Array.isArray(names); | |
console.log(isArray); // true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(Array.isArray('one')); // false | |
console.log(Array.isArray(['thing1', 'thing2'])); // true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const numbers = [60, 32, 55, 22, 10]; | |
const lessThan50 = numbers.find(number => number < 50 ); | |
console.log(lessThan50); | |
// output: 32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const people = ['chris', 'nick', 'holly']; | |
// find chris | |
const singlePerson = people.find(name => name === 'chris'); | |
console.log(singlePerson); | |
// output: chris |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const months = ['March', 'April', 'May']; | |
const otherMonths = ['June', 'July']; | |
const totalMonths = months.concat(otherMonths); | |
console.log(totalMonths); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
NewerOlder