Skip to content

Instantly share code, notes, and snippets.

@a-ludi
a-ludi / gpgedit
Last active July 23, 2023 21:19
gpgedit lets you edit a gpg-encrypted file without much fuzz -- similar to sudoedit.
#!/usr/bin/python
# gpgedit lets you edit a gpg-encrypted file without much fuzz -- similar to
# sudoedit.
#
# For this to achieve, gpgedit uses gpg to decrypt your file and save the
# plain text in a temporary file under /dev/shm (tmpfs) which will open in
# an editor. After the changes have been saved and the editor closed your
# plain text will be encrypted and written to the original file.
#
"""
A supervisorctl plugin which returns the status of a process and exits with a
proper exit code.
This is a workaround for `https://github.com/Supervisor/supervisor/issues/24`_
Configuration
-------------
Add this section to your supervisord.conf. You may need to adjust the path.
@nidico
nidico / issue-migrate-bitbucket-to-github.py
Created September 24, 2012 21:00
Helper script for issue migration from Bitbucket to GitHub
#!/usr/bin/env python
"""
This script helps migrating issues from Bitbucket to GitHub.
It currently ignores milestones completly and doesn't care whether an issue is
open, new or on hold. As long as it's not closed it's considered open.
To use it, install python-bitbucket, PyGithub and ipdb.
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@jordansissel
jordansissel / run-lamson.py
Created January 21, 2011 22:12
Lamson non-daemonizing run script.
from lamson import server, routing, utils
import sys, os
import logging
settings = utils.import_settings(True, from_dir=os.getcwd(), boot_module="config.boot")
settings.receiver.start()