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
document.querySelector('#exampleId'); | |
document.querySelector('.exampleClass'); | |
document.querySelectorAll('.exampleClass'); |
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
/** | |
* The proper way of throwing an error in JavaScript. Even prints a stack trace for you! | |
*/ | |
throw new Error('I am learning way too much JS in one day'); | |
/** | |
* Now we can even make our own errors. | |
*/ | |
function LearningError(message) { | |
this.message = message; |
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 msg = new SpeechSynthesisUtterance('hello, max'); | |
window.speechSynthesis.speak(msg); |
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
/** | |
* Neatly output results of an array into a nice table | |
* API: https://developer.mozilla.org/en-US/docs/Web/API/Console/table | |
*/ | |
console.table([ | |
{ name: 'Max', age: 24 }, | |
{ name: 'Susan', age: 52 }, | |
{ name: 'John', age: 33 } | |
]); |
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 | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'https://api.groupme.com/v3/bots/post'); | |
curl_setopt($ch, CURLOPT_POST, 1); | |
//REPLACE YOUR_BOT_ID with BOT_ID FROM GROUPME | |
curl_setopt($ch, CURLOPT_POSTFIELDS, "text=TESTING&bot_id=YOUR_BOT_ID"); | |
curl_exec($ch); | |
curl_close($ch); |
NewerOlder