I hereby claim:
- I am mda590 on github.
- I am mado (https://keybase.io/mado) on keybase.
- I have a public key whose fingerprint is FD6D 3178 4BD4 FFDF 5B70 54B0 54E7 E6AE 2894 4A7F
To claim this, I am signing this object:
aws ec2 describe-regions | jq -r '[.Regions[].RegionName] | @csv' |
I hereby claim:
To claim this, I am signing this object:
$curr_chan = "ygmTdEW7aF" | |
$curr_date = Get-Date -format "yyyy-MM-dd" | |
$wallpaper_json = (wget "https://beta.wall.cat/api/v1/channels/${curr_chan}/image/${curr_date}T00:00:00.000Z").Content | ConvertFrom-Json | |
$wallpaper_url = $wallpaper_json.payload.image.url.o | |
$wallpaper_local_path = (Get-ItemProperty -path 'HKCU:\Control Panel\Desktop').WallPaper | |
Invoke-WebRequest $wallpaper_url -OutFile $wallpaper_local_path |
""" | |
Produces load on all available CPU cores. | |
Requires system environment var STRESS_MINS to be set. | |
""" | |
from multiprocessing import Pool | |
from multiprocessing import cpu_count | |
import time | |
import os |
This shows a config file which can be parsed with Python's configparser. Rules.py will read this config file and construct a JSON object with IP addresses dynamically.
[domain1-rule]
Name = domain1-rule
RuleType = Forward
DomainName = domain1
Ips = 10.10.10.10, 10.10.10.11, 10.10.10.12
Port = 53
#!/bin/bash | |
FILES=$(ls -1) | |
BASE_RULES_PATH="/etc/rules" | |
FILE_LIST="" | |
for file in $FILES; do | |
if [[ $file =~ .*.yaml|.*.yml ]]; then | |
FILE_LIST+=" - $BASE_RULES_PATH/$file\n" | |
fi |
#!/bin/bash | |
# Fetches the list of available updates | |
sudo apt-get update -y | |
# Strictly upgrades the current packages | |
sudo apt-get upgrade -y | |
# Installs updates (new ones) | |
sudo apt-get dist-upgrade -y |