echo "alias docker-clean-unused='docker system prune --all --force --volumes'
alias docker-clean-containers='docker container stop $(docker container ls -a -q) && docker container rm $(docker container ls -a -q)'
alias docker-clean-all='docker container stop $(docker container ls -a -q) && docker system prune -a -f --volumes'" \
>> ~/.zshrc && source ~/.zshrc ## for zsh:
>> ~/.bashrc && source ~/.bashrc ## for 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
1. go to https://sslvpn.demo.sonicwall.com/cgi-bin/welcome | |
2. log in with demo/password | |
3. click on NetExtender icon, this will download a tar.gz with the client | |
4. sudo ln -s /lib/x86_64-linux-gnu/libssl.so.1.0.0 /usr/lib/libssl.so.6 | |
5. sudo ln -s /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.6 | |
6. un-tar the client, make install script executable and launch 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/env python | |
# -*- coding: utf-8 -*- | |
""" This Module reads data from serial port | |
then converts to JSON and sends to Amazon Firebase | |
""" | |
import serial | |
from time import sleep | |
from firebase import firebase |
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
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
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
// ==UserScript== | |
// @name Unnamed Script 760860 | |
// @version 1 | |
// @grant GM.xmlHttpRequest | |
// get all players who sent reinforcement | |
// ==/UserScript== | |
(async () => { | |
const rows = [...document.querySelectorAll('#overview > tbody > tr')]; | |
const thisPlayer = document.getElementsByClassName('playerName')[0].childNodes[3].innerHTML; |
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
<?php | |
/** | |
Send message to slack channel. | |
$hook can be created at https://mindau.slack.com/apps/A0F7XDUAZ-incoming-webhook | |
*/ | |
function sendLog($title, $msg) | |
{ | |
$hook = "https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; | |
$data = array( | |
'channel' => '#logging', |
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 | |
# This bash script exports all mysql databases and archives it with all webserver files. | |
# Created archive will be encrypted with gpg key. | |
# After sending to cloud storage all created files will be deleted | |
# This script uses: tar, gpg, mysql and aws3 s3 | |
# ** IMPORTANT** : | |
# ** You need to have generated gpg key !!! Otherwise comment encryption part. | |
# ** Execute this script with proper rights. It means that if in webserver dir | |
# you have files with permisions only for root user, then use sudo. |