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
echo "Creating an SSH key for you..." | |
ssh-keygen -t rsa | |
echo "Please add this public key to Github \n" | |
echo "https://github.com/account/ssh \n" | |
read -p "Press [Enter] key after this..." | |
echo "Installing xcode-stuff" | |
xcode-select --install |
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
axios({ | |
url: 'http://localhost:5000/static/example.pdf', | |
method: 'GET', | |
responseType: 'blob', // important | |
}).then((response) => { | |
const url = window.URL.createObjectURL(new Blob([response.data])); | |
const link = document.createElement('a'); | |
link.href = url; | |
link.setAttribute('download', 'file.pdf'); | |
document.body.appendChild(link); |
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 posts = [ | |
{ | |
"code":"BAcyDyQwcXX", | |
"caption":"Lunch #hamont", | |
"likes":56, | |
"id":"1161022966406956503", | |
"display_src":"https://scontent.cdninstagram.com/hphotos-xap1/t51.2885-15/e35/12552326_495932673919321_1443393332_n.jpg" | |
}, | |
{ | |
"code":"BAcJeJrQca9", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Redux: Avoiding Object Mutation</title> | |
<script src="https://wzrd.in/standalone/expect@latest"></script> | |
<script src="https://wzrd.in/standalone/deep-freeze@latest"></script> | |
</head> | |
<body> |
A Pen by Casey Burnett on CodePen.
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
// 7. Write a JavaScript function that accepts a string as a parameter and counts the number of vowels within the string. Go to the editor | |
// Note : As the letter 'y' can be regarded as both a vowel and a consonant, we do not count 'y' as vowel here. | |
// Example string : 'The quick brown fox' | |
// Expected Output : 5 | |
((str) => console.log( | |
str.split('') | |
.reduce( | |
(prev, current) => { | |
if("aeiouAEIOU".split('').indexOf(current) != -1){ | |
return ++prev; |
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
{ | |
"added_words": | |
[ | |
"Mockup", | |
"plugins", | |
"coffeescript", | |
"sourcemaps", | |
"html", | |
"plugin", | |
"init", |
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
var food = "pizza"; | |
function getFood(){ | |
console.log(food); //what does this line alert? | |
// Assigning var food is hoisted w/n function w/o assignment and first console.log returns undefined. Then var food is assigned saugages and returns "sausages" | |
var food = "sausages"; | |
console.log(food); // what does this line alert? | |
} |
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
var car = "Honda Civic"; | |
showCar(); | |
// By making it a function declaration scope & hoisting are not an issue | |
function showCar(){ | |
console.log(car); | |
} |
NewerOlder