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 greatest invention of | |
// manking is the concept | |
// of variable" - 🗝 Alonzo Church | |
const showJoy = expressJoy => joy => | |
expressJoy(joy.toUpperCase() + '!!!') | |
const functionalJoy = showJoy((message => | |
console.log(message))) | |
functionalJoy('This was long overdue!') |
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
{{lp|json_encode}} |
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
/,.+$/ // This expression matches anything that is after a , if in one line | |
for a string of this type: | |
"Friday May 2, 9am" | |
"jbjbkjbkjb"if | |
/,.+$/ expression would only match [ , 9am" ] if m flag is enabled i.e. /,.+$/m | |
. // matches any character except line breaks |
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
// Trick to destructure more than 1 property of an object in diff nested lvl | |
const { history: { action, location: { pathname } } } = props; |
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
Go to folder where ngrok is installed and: | |
`./ngrok http [port]` // where port is something like 3000 | |
To access on mobile, you need to enter the forwarding url |
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
-- SELECT clause | |
SELECT * FROM Employee | |
-- WHERE clause | |
WHERE id = 123 AND is_admin = 'true' | |
-- values are returned in the order they were asked (like an [ ] from a low level SQL database) | |
SELECT id, firstname, lastname FROM Employee | |
-- single quotes are used for string literals | |
-- Aliases (use the AS keyword to give a table or a column a local name or alias) | |
SELECT p.productname AS title FROM Product AS p |