Skip to content

Instantly share code, notes, and snippets.

View beneshed's full-sized avatar
👨‍💻
working

Ben Eshed beneshed

👨‍💻
working
View GitHub Profile
@beneshed
beneshed / README.md
Last active April 26, 2022 10:55
Azure Firewall Calculate Rule Collection Group Size - Python (Unofficial)
@beneshed
beneshed / re.txt
Last active May 23, 2019 10:54
Regex for auth.log
# generic
([A-Za-z]+)\s(\d+)\s((\d+):(\d+):(\d+))\s([A-Za-z0-9-]+)\s([A-Z-]+(\[[0-9]+\])?:)\s(.*)
# command specific
([A-Za-z]+)\s(\d+)\s((\d+):(\d+):(\d+))\s([A-Za-z0-9-]+)\s([A-Z-]+(\[[0-9]+\])?:)\s+(\w+)\s+:\s+TTY=([0-9A-Z\/]+\s;)\sPWD=([0-9A-Z\/]+\s;)\sUSER=([0-9A-Z\/]+\s;)\sCOMMAND=(.*)
@beneshed
beneshed / keybase.md
Created February 17, 2019 13:57
keybase.md

Keybase proof

I hereby claim:

  • I am thebenwaters on github.
  • I am shoconinja (https://keybase.io/shoconinja) on keybase.
  • I have a public key ASAHht95FDm0sqNBghgMcgrIFogX7Gym2Jj2lstZWCaUqgo

To claim this, I am signing this object:

{
"builders": [{
"type": "amazon-ebs",
"region": "us-east-1",
"source_ami": "ami-05e0b57f",
"instance_type": "t2.medium",
"ssh_username": "burrito",
"ssh_timeout": "15m",
"ami_name": "base-image16-pci-{{isotime | clean_ami_name}}",
"iam_instance_profile": "packer",
2018/01/29 15:34:12 [INFO] Packer version: 1.1.3
2018/01/29 15:34:12 Packer Target OS/Arch: darwin amd64
2018/01/29 15:34:12 Built with Go Version: go1.9.2
2018/01/29 15:34:12 Detected home directory from env var: /Users/benwaters
2018/01/29 15:34:12 Using internal plugin for lxc
2018/01/29 15:34:12 Using internal plugin for lxd
2018/01/29 15:34:12 Using internal plugin for null
2018/01/29 15:34:12 Using internal plugin for vmware-vmx
2018/01/29 15:34:12 Using internal plugin for virtualbox-ovf
2018/01/29 15:34:12 Using internal plugin for amazon-ebs
@beneshed
beneshed / alb_regex.py
Last active September 26, 2017 12:44
Python Named Regex for ALB
regex = r"(?P<PROTOCOL>http|https|h2) (?P<TIMESTAMP>[^ ]*) (?P<PATH>[^ ]*) (?P<SOURCE_IP>[^ ]*):(?P<SOURCE_PORT>[0-9]*) ((?P<DESTINATION_IP>[^ ]*):(?P<DESTINATION_PORT>[0-9]*)|-) (?P<REQUEST_PROCESS_TIME>[-.0-9]*) (?P<TARGET_PROCESSING_TIME>[-.0-9]*) (?P<RESPONSE_PROCESSING_TIME>[-.0-9]*) (?P<ELB_STATUS_CODE>-|[0-9]*) (?P<TARGET_STATUS_CODE>-|[0-9]*) (?P<RECEIVED_BYTES>[-0-9]*) (?P<SENT_BYTES>[-0-9]*) \"(?P<REQUEST_TYPE>[^ ]*) (?P<URL>[^ ]*) (?P<HTTP_VERSION>- |[^ ]*) (?P<USER_AGENT>\".*\") (?P<SSL_CIPHER>[-A-Za-z0-9]+) (?P<SSL_VERSION>[-A-Za-z0-9.]+) (?P<RESOURCE>[\/A-Za-z0-9:-]+) \"(?P<END_PATH>[A-Za-z0-9-=;]+)\""
@beneshed
beneshed / keybase.md
Created February 13, 2017 20:30
keybase.md

Keybase proof

I hereby claim:

  • I am thebenwaters on github.
  • I am thebenwaters (https://keybase.io/thebenwaters) on keybase.
  • I have a public key whose fingerprint is F4A8 B29B DFD3 5FD4 5A8E CE35 8D1B 46A2 E397 6991

To claim this, I am signing this object:

ok: [development] => {
"worker_settings": "'{\"web-app\":{\"servlet\":[{\"servlet-name\":\"cofaxCDS\",\"servlet-class\":\"org.cofax.cds.CDSServlet\",\"init-param\":{\"configGlossary:installationAt\":\"Philadelphia, PA\",\"configGlossary:adminEmail\":\"[email protected]\",\"configGlossary:poweredBy\":\"Cofax\",\"configGlossary:poweredByIcon\":\"/images/cofax.gif\",\"configGlossary:staticPath\":\"/content/static\",\"templateProcessorClass\":\"org.cofax.WysiwygTemplate\",\"templateLoaderClass\":\"org.cofax.FilesTemplateLoader\",\"templatePath\":\"templates\",\"templateOverridePath\":\"\",\"defaultListTemplate\":\"listTemplate.htm\",\"defaultFileTemplate\":\"articleTemplate.htm\",\"useJSP\":false,\"jspListTemplate\":\"listTemplate.jsp\",\"jspFileTemplate\":\"articleTemplate.jsp\",\"cachePackageTagsTrack\":200,\"cachePackageTagsStore\":200,\"cachePackageTagsRefresh\":60,\"cacheTemplatesTrack\":100,\"cacheTemplatesStore\":50,\"cacheTemplatesRefresh\":15,\"cachePagesTrack\":200,\"cachePagesStore\":100,\"cachePagesRe
"tmp_settings.stdout": "{\"web-app\":{\"servlet\":[{\"servlet-name\":\"cofaxCDS\",\"servlet-class\":\"org.cofax.cds.CDSServlet\",\"init-param\":{\"configGlossary:installationAt\":\"Philadelphia, PA\",\"configGlossary:adminEmail\":\"[email protected]\",\"configGlossary:poweredBy\":\"Cofax\",\"configGlossary:poweredByIcon\":\"/images/cofax.gif\",\"configGlossary:staticPath\":\"/content/static\",\"templateProcessorClass\":\"org.cofax.WysiwygTemplate\",\"templateLoaderClass\":\"org.cofax.FilesTemplateLoader\",\"templatePath\":\"templates\",\"templateOverridePath\":\"\",\"defaultListTemplate\":\"listTemplate.htm\",\"defaultFileTemplate\":\"articleTemplate.htm\",\"useJSP\":false,\"jspListTemplate\":\"listTemplate.jsp\",\"jspFileTemplate\":\"articleTemplate.jsp\",\"cachePackageTagsTrack\":200,\"cachePackageTagsStore\":200,\"cachePackageTagsRefresh\":60,\"cacheTemplatesTrack\":100,\"cacheTemplatesStore\":50,\"cacheTemplatesRefresh\":15,\"cachePagesTrack\":200,\"cachePagesStore\":100,\"cachePagesRefresh\":10,\"cachePages
changed: [development -> localhost] => {"changed": true, "cmd": ["node", "../scripts/config-generator.js", "../config/example2.json", "../config/example2.json"], "delta": "0:00:00.077297", "end": "2016-04-24 16:03:55.873826", "invocation": {"module_args": {"_raw_params": "node ../scripts/config-generator.js ../config/example2.json ../config/example2.json", "_uses_shell": false, "chdir": null, "creates": null, "executable": null, "removes": null, "warn": true}, "module_name": "command"}, "rc": 0, "start": "2016-04-24 16:03:55.796529", "stderr": "", "stdout": "{\"web-app\":{\"servlet\":[{\"servlet-name\":\"cofaxCDS\",\"servlet-class\":\"org.cofax.cds.CDSServlet\",\"init-param\":{\"configGlossary:installationAt\":\"Philadelphia, PA\",\"configGlossary:adminEmail\":\"[email protected]\",\"configGlossary:poweredBy\":\"Cofax\",\"configGlossary:poweredByIcon\":\"/images/cofax.gif\",\"configGlossary:staticPath\":\"/content/static\",\"templateProcessorClass\":\"org.cofax.WysiwygTemplate\",\"templateLoaderClass\":\"org.cofa