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
version: '3.3' | |
services: | |
database: | |
image: mysql:5.7 | |
container_name: mysql | |
restart: always | |
environment: | |
MYSQL_DATABASE: 'db' | |
MYSQL_USER: 'user' | |
MYSQL_PASSWORD: 'password' |
This plugin adds completion for the Kubernetes cluster manager, as well as some aliases for common kubectl commands.
To use it, add kubectl
to the plugins array in your zshrc file:
plugins=(... kubectl)
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
variables: | |
DOCKER_REGISTRY: 1234.dkr.ecr.ca-central-1.amazonaws.com | |
AWS_DEFAULT_REGION: ca-central-1 | |
APP_NAME: abc | |
DOCKER_HOST: tcp://docker:2375 | |
DOCKER_DRIVER: overlay2 | |
DOCKER_TLS_CERTDIR: "" | |
publish: | |
stage: build |
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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Update USB Boot Firmware stable using Raspberry Pi OS
sudo apt update && sudo apt full-upgrade
sudo reboot
sudo nano /etc/default/rpi-eeprom-update
and replace critical or beta to "stable"
sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/stable/pieeprom-2020-06-15.bin
Auto user login and vnc start on raspberry pi 4 kali linux 2020
Install raspi-config
wget http://archive.raspberrypi.org/debian/pool/main/r/raspi-config/raspi-config_20200601_all.deb
dpkg -i raspi-config_20200601_all.deb
apt-get -f install
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/python2.7 | |
import os, time | |
from sys import * | |
repeat = False | |
data = "" | |
i = 1 | |
if len(argv) > 1: | |
if argv[1] == 'repeat' or argv[1] == 'r' or argv[1] == '-repeat' or argv[1] == '-r': |
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
import os | |
import time | |
def measure_temp(): | |
temp = os.popen("vcgencmd measure_temp").readline() | |
return (temp.replace("temp=","")) | |
while True: | |
print(measure_temp()) | |
time.sleep(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
#!/bin/bash | |
# variables | |
LOGFILE="/var/log/nginx/access.log" | |
LOGFILE_GZ="/var/log/nginx/access.log.*" | |
RESPONSE_CODE="200" | |
# functions | |
filters(){ | |
grep $RESPONSE_CODE \ |
NewerOlder