parse @message /Query_time: (?<queryTime>.*?) Lock_time: (<?lockTime>.*?) Rows_sent: (?<rowsSent>.*?) Rows_examined: (?<rowsExamined>.*?)\s(?<query>.*?)$/
| filter @message like /(?i)insert/
| sort queryTime desc
| limit 10
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
| cd %ProgramFiles%\Common Files\Microsoft Shared\ClickToRun\ | |
| OfficeC2RClient.exe /update user updatetoversion=16.0.19231.20156 |
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
| #!/usr/bin/env bash | |
| # ~/bin/map-tablet.sh | |
| OUTPUT="HDMI-3" | |
| TABLET_ID=$(xinput list 2>/dev/null | grep -i "OpenTabletDriver" | grep "pointer" | grep -o "id=[0-9]*" | cut -d= -f2 | head -n1) | |
| if [ -z "$TABLET_ID" ]; then | |
| echo "No OpenTabletDriver pointer device found. Skipping." | |
| exit 0 | |
| fi |
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
| import apsw | |
| # https://pypi.org/project/apsw-sqlite3mc/ | |
| # https://github.com/utelle/apsw-sqlite3mc | |
| print(apsw.mc_version) | |
| con = apsw.Connection("base.cash") | |
| con.pragma("cipher", "aes256cbc") | |
| print(con.pragma("key", "DB_PASSWORD")) |
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
| from hashlib import pbkdf2_hmac | |
| salt = "J6Duybf2UcRhKchR06VbJWimv31xrlnN" | |
| plain_text_password = "Harbor12345" | |
| # plain_text_password "plain text password" | |
| # salt "salt field in database" | |
| # password "password field in database" | |
| # hash_name "password_version field in database" | |
| # iterations "fixed value 4096 in code" |
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
| SET @tables = NULL; | |
| SET GROUP_CONCAT_MAX_LEN=1048576; | |
| SELECT GROUP_CONCAT('`', table_schema, '`.`', table_name, '`' SEPARATOR ',') INTO @tables | |
| FROM information_schema.tables | |
| WHERE table_schema = (SELECT DATABASE()); | |
| SELECT IF(@tables IS NULL, | |
| 'SELECT NULL FROM (SELECT NULL) AS `empty` WHERE 0=1', | |
| CONCAT('DROP TABLE IF EXISTS ', @tables)) INTO @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
| entryPoints: | |
| web: | |
| address: ":80" | |
| websecure: | |
| address: ":443" | |
| http: | |
| routers: | |
| myrouter: | |
| rule: "Host(`bchain.example.in`)" |
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
| # https://github.com/dannysteenman/aws-toolbox | |
| # | |
| # License: MIT | |
| # | |
| # This script deletes all inactive task definitions in the ECS service in all AWS Regions. | |
| import boto3 | |
| def get_inactive_task_definition_arns(region): |
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
| version: '3' | |
| services: | |
| spark-master: | |
| image: bde2020/spark-master:3.3.0-hadoop3.3 | |
| container_name: spark-master | |
| ports: | |
| - "8080:8080" | |
| - "7077:7077" | |
| environment: | |
| - INIT_DAEMON_STEP=setup_spark |
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
| """ | |
| Queries the slowlog database table maintained by Amazon RDS and outputs it in | |
| the normal MySQL slow log text format. Modified version of the script by | |
| memonic (Thanks!) at https://gist.github.com/1481025 | |
| Things to change in this script for your own setup: | |
| <root_user> to your mysql root user (e.g. "root") | |
| <root_pass> to your mysql root password (e.g. "hunter2") | |
| <host_domain> to your mysql root password (e.g. "prod-01.w3rfs2.us-east-1.rds.amazonaws.com") |
NewerOlder