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
country=US | |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
network={ | |
ssid="<your_wifi_SSID>" | |
psk="<your_wifi_password>" | |
key_mgmt=WPA-PSK | |
} |
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 | |
cert=$1 | |
key=$2 | |
if [[ $# -eq 0 ]] | |
then | |
echo "Arguments not given. Usage: ./checkcert.sh CERTIFICATE.crt PRIVKEY.key" | |
else | |
crthash=$(openssl x509 -noout -modulus -in "$cert" | openssl md5) | |
echo $cert $crthash | |
keyhash=$(openssl rsa -noout -modulus -in "$key" | openssl md5) |
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
preferred_shell= | |
if [ -x /opt/bin/fish ]; then | |
preferred_shell=/opt/bin/fish | |
fi | |
if [ -n "$preferred_shell" ]; then | |
case $- in | |
*i*) SHELL=$preferred_shell; export SHELL; exec "$preferred_shell";; | |
esac | |
fi |
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 | |
# Bash script to get phone number by name using Google Places API | |
# By Davide Permunian - https://github.com/dade80vr | |
# Last update: Dec 13, 2018 | |
# Usage: ./getphone.sh "your query" | |
# Please change <your_api_key> - See https://developers.google.com/places/web-service/intro | |
apikey="<your_api_key>" |
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
#ACCOUNT BLOCCATI | |
get-aduser -Properties * -filter *| Where-Object {$_.LockedOut -eq $true} | select displayname,samaccountname | sort-object displayname | export-csv -Path e:\Test\users_Locked.csv -NoTypeInformation | |
#ACCOUNT DISABILITATI | |
get-aduser -Properties * -filter *| Where-Object {$_.Enabled -eq $false} | select displayname,samaccountname | sort-object displayname | export-csv -Path e:\Test\users_Disabled.csv -NoTypeInformation | |
#ACCOUNT ABILITATI | |
get-aduser -Properties * -filter *| Where-Object {$_.Enabled -eq $true} | select displayname,samaccountname | sort-object displayname | export-csv -Path e:\Test\users_Enabled.csv -NoTypeInformation | |
#ACCOUNT ATTIVI CON PSW SENZA SCADENZA |
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 | |
# DOT files clean script and auto eject | |
printf "Insert your USB/SD volume name (es: SD): " | |
read -r volumename | |
if df | grep -iw "$volumename" > /dev/null | |
then | |
echo "Cleaning dot_files into \"/Volumes/$volumename\" .." | |
sudo dot_clean /Volumes/$volumename | |
echo "Ejecting volume .." | |
sudo diskutil eject /Volumes/$volumename |
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
class QuickVersioning { | |
/* | |
Auto versioning by Git TAG + COMMIT | |
by Davide Permunian - https://github.com/dade80vr | |
*/ | |
public static function version() { | |
exec('git describe --abbrev=0 --tags',$last_tags); | |
if (count($last_tags)>0) { |
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
machine bitbucket.org | |
login myusername | |
password mypassword |
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 | |
#stop Darkstat service | |
sudo synoservicecfg --stop pkgctl-darkstat | |
#removing logfile | |
sudo rm /var/packages/darkstat/target/var/darkstat.data | |
#restart Darkstat service | |
sudo synoservicecfg --start pkgctl-darkstat |
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 | |
cat $1 | grep $2 -A 40 | awk '/-'$3'/ { print $(NF) }' |
NewerOlder