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 | |
# | |
# From: https://www.redhat.com/archives/rpm-list/2006-November/msg00062.html | |
# | |
# Generate dummy/fake RPMs - great for acceptance testing systems | |
# | |
NAME=$1 | |
# | |
# GEnerate Provides: |
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 python3 | |
import socket | |
import sys | |
s = socket.socket() | |
if len(sys.argv) != 3: | |
print(f"usage: {sys.argv[0]} HOSTNAME PORT") | |
sys.exit(1) | |
address = sys.argv[1] |
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
uci add firewall redirect | |
uci set firewall.@redirect[0].name='Transparent Proxy Redirect (privox)' | |
uci set firewall.@redirect[0].src=lan | |
uci set firewall.@redirect[0].proto=tcp | |
uci set firewall.@redirect[0].dest_port=8118 | |
uci set firewall.@redirect[0].src_dport=80 | |
uci set firewall.@redirect[0].src_dip='!192.168.1.1' | |
uci set firewall.@redirect[0].dest_ip=192.168.1.1 | |
uci set firewall.@redirect[0].target='DNAT' | |
uci commit firewall |
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
DO | |
$$BEGIN | |
IF EXISTS (SELECT FROM pg_roles WHERE rolname = 'my_user') THEN | |
EXECUTE 'ALTER USER...'; | |
ELSE | |
EXECUTE 'CREATE USER...'; | |
END IF; | |
END$$; |
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 | |
"""artifactory download size | |
Usage: | |
artifactory_download_size.py <filename> | |
artifactory_download_size.py (-h | --help) | |
Options: | |
-h --help Show this screen | |
""" |
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 | |
# define the shared secret we will accept to authenticate identity | |
SHARED_SECRET="your the best" | |
# capture the certname (hostname) used for the request | |
CERT_NAME=$1 | |
# feed STDIN (file descriptor 0) to the openssl command and pipe | |
# the output to grep to get the sharedSecret supplied by the agent | |
# capturing the value in a variable called AGENT_SECRET |
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
# How to run debuild with lintian on ubuntu | |
# fixes error: bad-distribution-in-changes-file unstable | |
# Finished running lintian. | |
debuild -us -uc --lintian-opts --profile debian |
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
diff --git a/eval-win10x64-enterprise.json b/eval-win10x64-enterprise.json | |
index 6ec43db..d33e59c 100644 | |
--- a/eval-win10x64-enterprise.json | |
+++ b/eval-win10x64-enterprise.json | |
@@ -186,10 +186,10 @@ | |
"vm_suffix": "", | |
"cm": "chef", | |
"cm_version": "", | |
- "cpus": "2", | |
- "memory": "2048", |
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
--- | |
- name: install ssm | |
hosts: all | |
tasks: | |
- name: script | |
shell: > | |
wget https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/debian_amd64/amazon-ssm-agent.deb && | |
sudo dpkg -i amazon-ssm-agent.deb && | |
sudo systemctl enable amazon-ssm-agent |
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
import os | |
afile = "sdcard.img" | |
bfile = "sdcard.img.manualworks" | |
afilediff = "sdcard.img.diff" | |
bfilediff = "sdcard.img.manualworks.diff" | |
afile_size = os.path.getsize(afile) | |
bfile_size = os.path.getsize(bfile) |
NewerOlder