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
ai71 foundry |
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 "folder path, . folder current directory" | |
read SOURCE_FOLDER | |
echo "userid" | |
read CRED | |
echo "hostname" | |
read HOST | |
ZIP_FILE="/tmp/backup.zip" | |
NEXTCLOUD_URL="https://"$HOST"/remote.php/dav/files/"$CRED"/docker-try/" |
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
apparmor_parser --add /var/lib/snapd/apparmor/profiles/snap.microk8s.* |
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
Python 2.7 webserver to debug incoming traffic | |
python -m SimpleHTTPServer 80 |
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
// converting canon cr2 images to jpeg | |
//create a folder named "Converted" | |
for i in *.CR2; do sips -s format jpeg $i --out Converted/$i.jpg;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
screen - To create a screen | |
screen -x [screen id] - Connect / Attach to a specific running screen. | |
Ctrl + D - while in a screen to Terminate / Stop a screen from running. | |
Ctrl + A, Then press D - while in a screen to detach from screen without disturbing it. | |
killall screen - Detach or terminate all screens. |
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
##Creating user | |
CREATE USER read_u PASSWORD 'any-password'; | |
##Creating role | |
create role client_readonly; | |
###Select the database that you need to grant the access then execute the queries | |
##Select public table too if neccessary | |
GRANT USAGE ON SCHEMA client_schema TO client_readonly; | |
GRANT SELECT ON ALL TABLES IN SCHEMA client_schema TO client_readonly; | |
##Making sure the future created tables in the schema have this rule enabled |
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
run.sh > /dev/null 2>&1& |
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
### FILTER PODS | |
kubectl delete pods --field-selector=status.phase=Pending | |
### GET IMAGES | |
kubectl get pods -o jsonpath="{.items[*].spec.containers[*].image}" |tr -s '[[:space:]]' '\n' |sort |uniq -c | |
### Delete pods not running | |
kubectl get pods | grep -v Running | awk '{print $1}' | xargs kubectl delete pod |
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
$listener = [System.Net.Sockets.TcpListener]6655 | |
$listener.Start(); | |
$listener.Stop(); |
NewerOlder