Generates a dependency graph for a list of installed python packages in the form of a dot file for graphviz.
python dependency-graph.py installed_package_name ... | dot -Tpng -o dependencies.png
# First denoise audio | |
## Get noise sample | |
ffmpeg -i input.ogg -vn -ss 00:00:00 -t 00:00:01 noise-sample.wav | |
## Create noise profile | |
sox noise-sample.wav -n noiseprof noise.prof | |
## Clean audio from noise | |
sox input.ogg clean.wav noisered noise.prof 0.21 |
/** | |
* Open https://app.snapp.ir | |
* Login with your credentials | |
* Copy and pasting this code in developer tools console | |
* Waiting... :) | |
*/ | |
(async function () { | |
function sleep(ms = 0) { | |
return new Promise(r => setTimeout(r, ms)); | |
} |
[docker] | |
command=$HOME/systemctl | |
interval=once | |
markup=pango | |
[redis] | |
command=$HOME/systemctl | |
interval=once | |
markup=pango |
# Create a root certificate and signing key. | |
$ step certificate create "Root CA" root.crt root.key --profile root-ca | |
Please enter the password to encrypt the private key: | |
Your certificate has been saved in root.crt. | |
Your private key has been saved in root.key. | |
# Create an intermediate certificate & signing key. This isn't | |
# required; we could use the root to sign directly which is | |
# probably fine for local dev and removes the need to bundle later. | |
$ step certificate create "Intermediate CA" int.crt int.key --profile intermediate-ca --ca root.crt --ca-key root.key |
/** | |
* Add another product depending on the cart total | |
*/ | |
add_action( 'template_redirect', 'add_product_to_cart' ); | |
function add_product_to_cart() { | |
if ( ! is_admin() ) { | |
global $woocommerce; | |
$product_id = 2831; //replace with your product id | |
$found = false; | |
$cart_total = 30; //replace with your cart total needed to add above item |
docker images | tail -n +2 | grep -v "none" | awk '{printf("%s:%s\n", $1, $2)}' | while read IMAGE; do | |
echo $IMAGE | |
filename="${IMAGE//\//-}" | |
filename="${filename//:/-}.docker-image.gz" | |
docker save ${IMAGE} | pigz --stdout --best > $filename | |
done |
Contributed by Fabien Loudet, Linux SysAdmin at Rosetta Stone
Tired of always having to enter your SSH key passphrase when logging in to remote machines?
Here comes ssh-agent
. Enter the passphrase once and it will keep it in memory for you
Using ssh-agent in your shell session:
from smb.SMBConnection import SMBConnection | |
userID = 'user' | |
password = 'password' | |
client_machine_name = 'localpcname' | |
server_name = 'servername' | |
server_ip = '0.0.0.0' | |
domain_name = 'domainname' |