Skip to content

Instantly share code, notes, and snippets.

View sanjaykrishnan's full-sized avatar

sanjay krishnan sanjaykrishnan

  • Sayone Technologies
  • Kerala
View GitHub Profile
@sanjaykrishnan
sanjaykrishnan / gist:4074324918b89c4bab5644c82246eb39
Created October 8, 2018 04:36
GET parameters in reverse of url.
GET parameters have nothing to do with the URL as returned by reverse. Just add it on at the end:
url = "%s?name=joe" % reverse(viewOne)
sudo -su postgres
psql
create database wynvent;
CREATE USER myuser WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE "wynvent" to myuser;
ALTER USER myuser WITH SUPERUSER;
#quit psql shell
\q
#list all databases
\l
@sanjaykrishnan
sanjaykrishnan / gist:3026b9c3c3ded3a8ac1f7c4dd90f7703
Created September 7, 2018 12:01
How to find diff in files in 2 directories
You can use the diff command just as you would use it for files:
diff <directory1> <directory2>
If you want to see subfolders and -files too, you can use the -r option:
diff -r <directory1> <directory2>