// jQuery
$(document).ready(function() {
// code
})
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
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
// Correct Way | |
function indexOf(str, query) { | |
for(var i = 0; i < str.length; i++) { | |
for(var q = 0; q < query.length; q++) { | |
if (str[i+q] !== query[q]) { | |
break; | |
} | |
if (q === query.length - 1) { | |
return i; | |
} |
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
python manage.py shell |
It's great for beginners. Then it turns into a mess.