>
file redirects stdout to file1>
file redirects stdout to file2>
file redirects stderr to file&>
file redirects stdout and stderr to file
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
#!/usr/bin/python | |
from azure.storage import BlobService | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument("container", help="the blob container") | |
parser.add_argument("blob", help="the blob name") | |
parser.add_argument("-s", "--snapshot", help="take a new snapshot", action="store_true") | |
parser.add_argument("-d", "--delete", help="delete a snapshot") |
Using from https://github.com/wurstmeister/kafka-docker.git and docker-compose.yml
is:
version: '2'
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
volumes:
You'll get the same exception if the index was created defining a PRIMARY KEY or UNIQUE constraint (ref).
In that case the simple solution is to use the ALTER-TABLE-command instead:
ALTER TABLE tbl1 DROP CONSTRAINT ix_cox
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
find . -name "node_modules" -type d -prune -exec rm -rf '{}' + |
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
/* | |
* AWS Sdk KMS spike: (assuming node v6.6+) | |
* 1 - Create master key at KMS | |
* 2 - Copy alias or ARN | |
* 3 - run this i.e. | |
* $ node spike.js KEY_ALIAS YOUR_PLAINTEXT_TO_ENCRYPT | |
* | |
* Taken from https://gist.github.com/raytung/f7dc78bb4310d02217111246da8cfdb3 | |
*/ | |
const AWS = require('aws-sdk'); |
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
docker run -i -t <image> [<command>] # startup the container and run the <command> == /bin/bash inside | |
docker start -i -a <container> [<container>] # start some previously stopped containers | |
docker exec -i -t <container> <command> # run a command in a running container, <command> == /bin/bash |
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
-- username and permissions for a particular schema | |
select u.usename, | |
has_schema_privilege(u.usename,s.schemaname,'create') AS user_has_select_permission, | |
has_schema_privilege(u.usename,s.schemaname,'usage') AS user_has_usage_permission | |
FROM pg_user u | |
cross join (select distinct schemaname from pg_tables) s | |
where u.usename = '<the_username>' | |
and s.schemaname = '<the_schemaname>'; |
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
LAST_EPOCH=17654 |