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
$files = Get-Content "file_name_with_a_list_of_file_names" | |
foreach ($file in $files) { | |
select-string -Path $file -Pattern ">([0-9]+)" -AllMatches|%{$_.Matches[0].groups[1].value} | |
} |
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
# Remove Windows Cortana | |
$path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" | |
IF(!(Test-Path -Path $path)) { | |
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows" -Name "Windows Search" | |
} | |
Set-ItemProperty -Path $path -Name "AllowCortana" -Value 1 | |
Stop-Process -name explore | |
# Enable Ubuntu on Windows 10 | |
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux |
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
docker run --name zabbix-server-mysql -t \ | |
-e DB_SERVER_HOST="mysql-server" \ | |
-e MYSQL_DATABASE="zabbix" \ | |
-e MYSQL_USER="zabbix" \ | |
-e MYSQL_PASSWORD="zabbix_pwd" \ | |
-e MYSQL_ROOT_PASSWORD="root_pwd" \ | |
-e ZBX_JAVAGATEWAY="zabbix-java-gateway" \ | |
--link mysql-server:mysql \ | |
--link zabbix-java-gateway:zabbix-java-gateway \ | |
-p 10051:10051 \ |
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
var fs = require('fs'); | |
var sites = []; | |
var threshold = { | |
"performance": 0.90, | |
"accessibility": 0.95, | |
"seo": 0.90, | |
"pwa": 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
echo "exit" >> ~/.bashrc |
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 | |
# Important: Only use if you are working on a branch by yourself otherwise it will overwrite someone updates | |
git reset --soft HEAD~1 \ | |
&& git add . && git commit -m "$1" \ | |
&& git push --force origin | |
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
http://opensecuritytraining.info/ |
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
while true | |
do | |
FILENAME=$(date +%Y%m%d-%H-%M-%S.jpg) | |
curl "http://192.168.15.11/cam-hi.jpg" -o "$FILENAME" --silent | |
gsutil cp $FILENAME "gs://esp32cam-timelapse/$FILENAME" | |
sleep 1; | |
rm $FILENAME | |
done |
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
# create the timelapse | |
ffmpeg -r 10 -pattern_type glob -i "*.jpg" -vcodec libx264 output.mp4 |
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 | |
# Run with source: | |
# source ./aws-getter.sh and you should be good - it will set your environment variable. | |
TEMP_FILE="/tmp/all-accounts.txt" | |
rm -rf $TEMP_FILE | |
cat ~/.aws/credentials | grep -E "\[.*?\]" | tr "[" " " | tr "]" " " | sort | uniq > $TEMP_FILE | |
INDEX=1 |
OlderNewer