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
git config --add oh-my-zsh.hide-status 1 | |
git config --add oh-my-zsh.hide-dirty 1 |
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
list databases: \l *; | |
non-binary way: | |
export PGPASSWORD=whatever | |
for F in $(cat dbs); do echo $F; psql -h dt-rds-test.coivvuccn9hs.eu-west-1.rds.amazonaws.com -v -U postgres -d ${F} < ${F}.sql ; done | |
binary way: | |
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Procedural.Importing.html | |
# above way doesnt seem to work with roles etc. |
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
umount /mnt/c; sudo mount -t drvfs C: /mnt/c -o metadata |
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
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '" | |
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
if( $found ){ | |
$remoteport = $matches[0]; | |
} else{ | |
echo "The Script Exited, the ip address of WSL 2 cannot be found"; | |
exit; | |
} |
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
const aws = require('aws-sdk'); | |
aws.config.region = 'eu-west-1'; | |
const cloudwatchlogs = new aws.CloudWatchLogs(); | |
const moment = require('moment'); | |
const fs = require('fs'); | |
const filename = `results-${new Date().getTime()}.csv`; | |
fs.appendFileSync(filename, ['logGroup','dollars','rcnt','numberdollars','total'].join(",") + "\n"); | |
const endTime = moment().toDate().getTime(); |
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
async function getAllS3Objects(Params) { | |
let listing = true; | |
const objects = []; | |
while (listing) { | |
const data = await s3.listObjects(Params).promise(); | |
if (!data.isTruncated) { | |
listing = false; | |
} else { | |
Params.Marker = data.NextMarker; | |
} |
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
class Chezzers(sfn.IStepFunctionsTask): | |
def __init__(self, app, id, **kwargs): | |
super().__init__(app, **kwargs) | |
def bind(task): | |
print("called it!") |
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
xset b off | |
xset b 0 0 0 |
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
echo "Hello" |
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
for F in $(seq 1); do echo "Doing $F"; bash -c 'sleep 1; echo -e "login:a:a;\r\ncommand;\r\nlogout;\r\n"' | netcat localhost 8094; done |
NewerOlder