Navigation Menu

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 / app.rb
Created November 29, 2011 20:02
Testing jquery-ui sortable with capybara
# Run via: ruby -rubygems app.rb
require 'sinatra'
require 'haml'
disable :logging
get '/' do
title = "Drag'n'drop issue reduction"
haml :index
end
@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 / view.py
Created April 4, 2013 12:39
How to support views from SQLAlchemy.
from operator import attrgetter
from sqlalchemy import Table, event, subquery
from sqlalchemy.ext.compiler import compiles
from sqlalchemy.engine.reflection import Inspector
from sqlalchemy.schema import DDLElement
from sqlalchemy.sql.expression import Executable, ClauseElement
from yeepa.common.util import monkey_patch
from yeepa.backend.models import DBSession, metadata, Base, read_only_metadata