Skip to content

Instantly share code, notes, and snippets.

@dwt
dwt / decrypt-sym-pass-plesk.php
Created December 19, 2023 11:05 — forked from gnanet/decrypt-sym-pass-plesk.php
Decrypt symmetric encrypted passwords of plesk stored in "psa" database in table "accounts"
#!/usr/bin/php
<?php
/*
* Decrypt symmetric encrypted passwords of plesk stored in "psa" database in table "accounts"
* Script has to be run on the plesk server locally
*
* /usr/local/sbin/decrypt-sym
*
*/
@dwt
dwt / Dockerfile
Created March 23, 2022 15:28
Reproduction of sqlalchemy freeze
FROM python:3.6
ARG USER_NAME=auth
ARG GROUP_NAME=auth
ARG PORT=8005
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --yes postgresql
# explicitly set user/group IDs
RUN set -eux; \
@dwt
dwt / fix_configure_recognizes_mac_os_12.patch
Created January 29, 2022 16:36
Build Scripts for multiple parallel python versions
diff --git a/configure b/configure
index c51f396824b63521034929cf98a37cee40b86254..5024860ca4395aa3a71de307a0e8335ceb2d77da 100755
--- a/configure
+++ b/configure
@@ -3426,7 +3426,7 @@ $as_echo "#define _BSD_SOURCE 1" >>confdefs.h
# has no effect, don't bother defining them
Darwin/[6789].*)
define_xopen_source=no;;
- Darwin/1[0-9].*)
+ Darwin/[12][0-9].*)
@dwt
dwt / pyexpect.ipynb
Last active February 23, 2019 15:14
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am dwt on github.
  • I am dwt (https://keybase.io/dwt) on keybase.
  • I have a public key ASD88WOXhGIVzeLR5SBqiWXkkmwdJwtAwjRPOEE7MeeNsQo

To claim this, I am signing this object:

CHROMEDRIVER_PATH = '/Users/dwt/.virtualenvs/yeepa/bin/chromedriver'
CHROME_PATH = '/Users/dwt/Applications/Network/Browser/Google Chrome.app/Contents/MacOS/Google Chrome'
def selenium()
require 'capybara'
require 'capybara/dsl'
require 'selenium-webdriver'
Capybara.register_driver :chrome do |app|
Selenium::WebDriver::Chrome.driver_path = CHROMEDRIVER_PATH
@dwt
dwt / # cracklib - 2018-01-16_14-26-12.txt
Created January 16, 2018 13:31
cracklib on macOS 10.13.2 - Homebrew build logs
Homebrew build logs for cracklib on macOS 10.13.2
Build date: 2018-01-16 14:26:12
@dwt
dwt / .kermit-vocore.conf
Created December 31, 2017 18:00
Connect to Vocore v2 via Kermit
set line /dev/tty.usbmodem_____1
set speed 115200
set stop-bits 1
set parity none
set carrier-watch off
connect
# Escape character: Ctrl-\
@dwt
dwt / gist:3ab3489cbed83f9aa789
Created July 14, 2015 14:05
Ansible bug in variable resolution order
foo
@dwt
dwt / traceback
Created July 3, 2015 10:39
traceback
2015-07-03T10:04:22.855073+00:00 app[web.1]: Internal Server Error: /admin/process/processstep/2/
2015-07-03T10:04:22.855079+00:00 app[web.1]: Traceback (most recent call last):
2015-07-03T10:04:22.855081+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/base.py", line 164, in get_response
2015-07-03T10:04:22.855083+00:00 app[web.1]: response = response.render()
2015-07-03T10:04:22.855085+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/template/response.py", line 158, in render
2015-07-03T10:04:22.855086+00:00 app[web.1]: self.content = self.rendered_content
2015-07-03T10:04:22.855088+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/template/response.py", line 135, in rendered_content
2015-07-03T10:04:22.855090+00:00 app[web.1]: content = template.render(context, self._request)
2015-07-03T10:04:22.855092+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/django/templ