This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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) |
This file contains hidden or 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
/** | |
* @param? config | |
* @param? errors | |
* The annotations are essential to inject $config and $errors! | |
* If you don't use a doc-string variable you injected... Whole form crashes until you remove it! | |
* Browsers cache compiled soy.. clear cache and reload if its not updating! | |
*/ | |
{template .view} | |
</h1>This is just a brain dump</h1> |
This file contains hidden or 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
awk ' | |
{if ($0 ~ /^GRUB_CMDLINE_LINUX=/) {gsub("transparent_hugepage=[[:alnum:]]*[[:space:]]?", "", $0) ; gsub("[[:space:]]?\"$", " transparent_hugepage=never\""); print $0 } else {print}} | |
' < brett.txt |
This file contains hidden or 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
require 'excon' | |
require 'json' | |
module PuppetNodePurge | |
def self.setup() | |
@@ssldir = '/etc/puppetlabs/puppet/ssl' | |
@@fqdn = %x(facter fqdn).strip.downcase | |
end | |
def self.get_conf() | |
conf = { |
This file contains hidden or 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
find . -iname 'metadata.json' -exec jq '"mod " + (.name | split("-"))[1] + ", :git => " + .source + ", :tag => " + .version' {} \; |
NewerOlder