Skip to content

Instantly share code, notes, and snippets.

@saaj
saaj / HISTORY.rst
Created April 26, 2020 20:04
Development MySQL server and administrative UI
@saaj
saaj / HISTORY.rst
Last active May 10, 2020 10:43
Example of using thread and process pools to make parallel queries to MySQL
@saaj
saaj / Dockerfile
Last active May 10, 2020 10:41
Python3 MySQL adapter benchmark
FROM ubuntu:trusty
ENV DEBIAN_FRONTEND=noninteractive LANG=C.UTF-8
RUN apt-get update -q
RUN apt-get install --no-install-recommends -qy \
mysql-server libmysqlclient-dev python3-pip python3-dev build-essential
RUN apt-get install --no-install-recommends -qy wget
RUN pip3 install mysqlclient pymysql pytest-benchmark
@saaj
saaj / HISTORY.rst
Last active May 10, 2020 10:45
Better die with SL4A/QPython3 and Python on Android
@saaj
saaj / build-plotly-falcon-appimage.sh
Last active July 16, 2021 12:50
Build Plotly Falcon AppImage with fresh SQLite3
#!/bin/bash -e
VERSION=4.1.0
mkdir dist
chmod 777 dist
cat << EOF > docker-build.sh
#!/bin/bash -e
@saaj
saaj / make-rdm-app-image.sh
Last active October 26, 2022 19:13
Convert Redis Desktop Manger's Snap into an AppImage
#/bin/bash -e
# This coverts Redis Desktop Manager's Snap into an AppImage.
# Inspired by https://github.com/AppImage/AppImageKit/issues/166
# Tested on Linux Mint 18 / Ubuntu Xenial
if ! [ -x "$(command -v unsquashfs)" ]; then
echo 'Error: squashfs-tools is not installed.' >&2
exit 1
fi
@saaj
saaj / 73498.svg
Created August 1, 2019 18:21
hstr demo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@saaj
saaj / marshmallow.ipynb
Last active September 12, 2018 09:50
Marshmallow field validation for an empty text field
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@saaj
saaj / jira-markdown-converter.user.js
Last active August 18, 2017 08:54
This userscript converts between Jira markup and Markdown in Jira ticket textarea
// ==UserScript==
// @name Jira Markdown Converter
// @namespace https://gist.github.com/saaj/fb58cfca7d682a4d3c8083239eafc174
// @description This userscript converts between Jira markup and Markdown in Jira ticket textarea
// @version 0.1.2
// @author saaj
// @match https://*.atlassian.net/*
// ==/UserScript==
/**