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 / multidatabasedjango
Created June 6, 2014 23:10
Multi Database Django
Create Routers
Disable Routers
python manage.py syncdb --database=(whateverdatabase uses auth)
Enable Routers
python mangge.py syncdb

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 3110 DBE3 0028 BC48 E521 17F5 82D2 C266 1797 A0E4

To claim this, I am signing this object:

@beneshed
beneshed / keybase.md
Created November 11, 2014 17:19
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 CF6A 6289 C236 D7FE F057 19B7 902E 751D AE35 DF22

To claim this, I am signing this object:

@beneshed
beneshed / example.json
Created April 22, 2016 12:03
first example
{"widget": {
"debug": "on",
"window": {
"title": "Sample Konfabulator Widget",
"name": "main_window",
"width": 500,
"height": 500
},
"image": {
"src": "Images/Sun.png",
@beneshed
beneshed / example2.json
Created April 22, 2016 12:04
second example
{"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",
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
"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
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
@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:

@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-=;]+)\""