Skip to content

Instantly share code, notes, and snippets.

View xolox's full-sized avatar

Peter Odding xolox

View GitHub Profile
@xolox
xolox / gather-key-ids.py
Last active October 13, 2018 15:13
Ubuntu release signing key ids scraper (minimal effort 😇)
import csv
import datetime
import requests
# https://pypi.org/project/pgpdump/
import pgpdump
def main():
collected_key_ids = {}
@xolox
xolox / pipenv-transcript.txt
Created April 25, 2018 22:39
humanfriendly issue #25
Creating a virtualenv for this project…
Using /usr/bin/python2.7 (2.7.12) to create virtualenv…
⠋Running virtualenv with interpreter /usr/bin/python2.7
New python executable in /home/peter/.virtualenvs/2018-04-26-vDsN2h86/bin/python2.7
Also creating executable in /home/peter/.virtualenvs/2018-04-26-vDsN2h86/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /home/peter/.virtualenvs/2018-04-26-vDsN2h86
Creating a Pipfile for this project…
Installing humanfriendly…
@xolox
xolox / issue-49.log
Created February 18, 2015 20:37
pip-accel issue #49 (scipy / numpy / setuptools / setup_requires interaction)
2015-02-17 23:53:02 - Running first 'pip-accel install scipy' command ..
2015-02-18 00:06:59 - Running second 'pip-accel install scipy' command ..
2015-02-18 00:09:02 - Built 2 packages on first run.
2015-02-18 00:09:02 - Built 0 packages on second run.
2015-02-18 00:09:03 - Done!
Time of first run: +/- 14 minutes
Time of second run: +/- 2 minutes
@xolox
xolox / keybase.md
Created February 11, 2015 21:03
keybase.md

Keybase proof

I hereby claim:

  • I am xolox on github.
  • I am xolox (https://keybase.io/xolox) on keybase.
  • I have a public key whose fingerprint is FECE 1A47 A0E1 75A5 3EA4 B07E D789 DE0C 0091 3D92

To claim this, I am signing this object:

@xolox
xolox / pip-accel-transcript.txt
Created June 15, 2013 23:19
The pip accelerator now supports dependencies on Debian system packages :-)
2013-06-16 01:01:53 wheezy-vm INFO Building binary distribution of python-mcrypt (1.1) ..
2013-06-16 01:01:53 wheezy-vm ERROR Failed to build binary distribution of python-mcrypt! (version: 1.1)
2013-06-16 01:01:53 wheezy-vm INFO Build output (will probably provide a hint as to what went wrong):
running bdist_dumb
running build
running build_ext
building 'mcrypt' extension
creating build
creating build/temp.linux-i686-2.7
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="1.1" -I/usr/include/python2.7 -c mcrypt.c -o build/temp.linux-i686-2.7/mcrypt.o
@xolox
xolox / restore-zsh-history.lua
Created January 31, 2012 22:20
Lua script to restore ZSH history file from backups (useful for completion)
#!/usr/bin/env lua
-- Posted this online because of http://news.ycombinator.com/item?id=3535349
ordered = {}
index = {}
need_continuation = false
first_continued_line = 0
function add_or_replace(line)
@xolox
xolox / build-vim.sh
Last active September 27, 2015 13:07
Shell script to build the latest Vim directly from the Mercurial repository
#!/bin/bash -e
# Shell script to build Vim from sources according to my taste :-)
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: June 22, 2014
# URL: https://gist.github.com/xolox/1274179
#
# This shell script compiles Vim from the latest available sources (cloned and
# updated via Mercurial) on Debian derived distributions (I've successfully
@xolox
xolox / searchrepo.vim
Created March 15, 2011 10:11
Vim command to search version controlled directory trees using grep -F
" While getting to know new code bases I frequently "grep" for identifiers
" because Exuberant Ctags and Cscope only on work for a few programming
" languages while "grep" works on all text files.
command! -nargs=+ -complete=customlist,xolox#complete#keywords SearchRepo call s:SearchRepo(<f-args>)
function! s:SearchRepo(...)
cclose
let repository = finddir('.git', '.;')
if repository == ''
@xolox
xolox / libapreq2-2.13\win32\libapreq2.mak
Created February 27, 2011 00:53
The original Windows makefile for libapreq2 v2.13 (dependent on Apache and Perl)
# Microsoft Developer Studio Generated NMAKE File, Based on libapreq.dsp
# Compile with NMAKE /f libapreq2.mak "CFG=libapreq2 - Win32 Debug"
APR_LIB=c:\lua-apr\apr\Release\libapr-1.lib
APU_LIB=c:\lua-apr\apr-util\Release\libaprutil-1.lib
APREQ_HOME=c:\lua-apr\libapreq2
!IF "$(CFG)" == ""
CFG=libapreq2 - Win32 Release
!MESSAGE No configuration specified. Defaulting to libapreq2 - Win32 Release.
@xolox
xolox / gvim.sh
Created September 25, 2010 19:10
Make graphical Vim use one instance where possible
#!/bin/sh
# This UNIX shell script makes graphical Vim use one instance where possible.
# Save this script as ~/bin/gvim, make sure it's executable and you're off! If
# it doesn't work uncomment the lines with XXX in them and run the script from
# a console.
# Configuration variables.
GVIM=/usr/local/bin/gvim
WMCTRL=/usr/bin/wmctrl # <- try `sudo apt-get install wmctrl'