This file contains hidden or 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
print("hello") |
This file contains hidden or 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
diff --git a/postgresql_backend/introspection.py b/postgresql_backend/introspection.py | |
index a856d26..d030edb 100644 | |
--- a/postgresql_backend/introspection.py | |
+++ b/postgresql_backend/introspection.py | |
@@ -11,4 +11,5 @@ class DatabaseSchemaIntrospection(DatabaseIntrospection): | |
WHERE c.relkind IN ('r', 'v', '') | |
AND n.nspname = '%s' | |
AND pg_catalog.pg_table_is_visible(c.oid)""" % self.connection.schema_name) | |
- return [row[0] for row in cursor.fetchall() if row[0] not in self.ignored_tables] | |
+ #return [row[0] for row in cursor.fetchall() if row[0] not in self.ignored_tables] |
This file contains hidden or 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
#!/bin/bash | |
echo "PostgreSQL" | |
export PGPASSWORD="postgre password here" | |
DBLIST=`psql -U postgres -d postgres -q -t -c 'SELECT datname from pg_database'` | |
for d in $DBLIST | |
do | |
echo "Dumping $d"; | |
pg_dump -U postgres $d > /path/to/dump/directory/$d.postgres.sql | |
done |
This file contains hidden or 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
#! /home/blackmonk15/.virtualenv/bm/bin/python | |
import os, sys, re | |
from os import listdir | |
import time | |
import subprocess | |
from datetime import datetime | |
from optparse import OptionParser | |
BCKP_DIR = "/home/blackmonk15/alldbbckp" |
This file contains hidden or 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
reload i3 config - $mod + Shift + r | |
switch to vertical tiling - $mod + v | |
switch to horizontal tiling - $mod + h | |
switch to stack mode - $mod + s | |
switch to tiling mode - $mode + e | |
open dmenu(like ubuntu dash) - $mod + d | |
maximaize window - $mod + w | |
switch window in current workspace - $mod + <j|k|l|;> or <arrow key> | |
resize windows - $mod + r then press right/left arrow keys ; Esc to escape resize mode | |
switch window positon - $mod + shift + <left/right/up/down arrow> |
This file contains hidden or 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
1. From the AWS EC2 Console go to "Key Pairs" and generate a new key pair (eg: NewKey.pem); Download the generated pem key, and chmod it to 0666 | |
2. Use the new pem key to generate a public key | |
$ ssh-keygen -y | |
When prompted, enter the path to NewKey.pem. This will generate NewKey.pub | |
Tip: Edit NewKey.pub and append the key's name so you can identify it easier in the next steps. | |
Just append a single space, then a tag/name for the key |
This file contains hidden or 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
vcl 4.0; | |
# Default backend definition. Set this to point to your content server. | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} | |
sub vcl_recv { | |
# Happens before we check if we have this in cache already. |
This file contains hidden or 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
# dump specific postgres schemas from database `mydb` | |
pg_dump -U postgres -nschema1 -npublic -npg_catalog -npg_toast -ninformation_schema -Fc mydb > mydb.dump | |
# after restoring above data move the table from the original schema to public schema | |
DO | |
$$ | |
DECLARE | |
row record; | |
BEGIN |
This file contains hidden or 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
rofi usage: | |
rofi [-options ...] | |
Command line only options: | |
-no-config Do not load configuration, use default values. | |
-v,-version Print the version number and exit. | |
-dmenu Start in dmenu mode. | |
-display [string] X server to contact. | |
${DISPLAY} | |
-h,-help This help message. |
This file contains hidden or 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
# | |
# Varnish AWS S3 Gateway VCL | |
# | |
# Allows global read (GET, HEAD) and ACL protected writes (POST, PUT, DELETE). | |
# When writing, pass in Content-Type and Content-MD5, both are optional. | |
# | |
# Params: | |
# | |
# %BUCKET% - S3 bucket name, S3 host may be regional | |
# %ACCESS_ID% - IAM access ID for bucket |
OlderNewer