Skip to content

Instantly share code, notes, and snippets.

@tuxity
tuxity / navicat_premium_reset_trial.sh
Last active May 6, 2024 11:09
Reset Navicat Premium 15/16 remaining trial days
#!/bin/bash
set -e
file=$(defaults read /Applications/Navicat\ Premium.app/Contents/Info.plist)
regex="CFBundleShortVersionString = \"([^\.]+)"
[[ $file =~ $regex ]]
version=${BASH_REMATCH[1]}
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active May 7, 2024 11:49
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
@daleobrien
daleobrien / install_pypy.sh
Last active February 15, 2017 12:20
pypy install script on AWS
# Needs a larger machine, with at least 2GB Ram, say a m2.xlarge!
sudo yum install \
gcc make python-devel libffi-devel lib-sqlite3-devel pkgconfig \
zlib-devel bzip2-devel ncurses-devel expat-devel \
openssl-devel gc-devel python-sphinx python-greenlet tcl-devel
wget https://bitbucket.org/pypy/pypy/downloads/pypy-2.1-beta-src.tar.bz2
tar -xvf pypy-2.1-beta-src.tar.bz2
cd pypy-2.1-beta-src
@kwarrick
kwarrick / fncache.py
Last active March 25, 2023 01:28
Redis-backed LRU cache decorator in Python.
#!/usr/bin/env python
__author__ = 'Kevin Warrick'
__email__ = 'kwarrick@uga.edu'
import cPickle
from functools import wraps
def redis_lru(capacity=5000, slice=slice(None)):
"""
Simple Redis-based LRU cache decorator *.