Skip to content

Instantly share code, notes, and snippets.

Jonas Kalderstam spacecowboy

Block or report user

Report or block spacecowboy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@spacecowboy
spacecowboy / opml_to_org.pl
Created Feb 23, 2017
Naive OPML to Orgmode converter
View opml_to_org.pl
#!/usr/bin/env perl
print "* Blogs\n";
while (<>) {
if (/text="(.*?)">/) {
print "** $1 :$1:\n";
}
if (/text="(.*?)" type=".*?" xmlUrl="(.*?)"/) {
print "*** [[$2][$1]]\n"
@spacecowboy
spacecowboy / markverified.py
Created Feb 8, 2017
Script which outputs a key list with 'X'-es on the keys you've verified.
View markverified.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Usage: {} <ksp-fosdem.txt> <result.txt>
Marks which keys you have verified from a keysigning party.
Tested on FOSDEM keysigning party 2017.
'''
View keybase.md

Keybase proof

I hereby claim:

  • I am spacecowboy on github.
  • I am spacecowboy (https://keybase.io/spacecowboy) on keybase.
  • I have a public key whose fingerprint is 3270 DC43 5A7D 604F 5B06 3521 987C 54AB 0D44 51ED

To claim this, I am signing this object:

@spacecowboy
spacecowboy / ghosttohugo.py
Last active Jul 17, 2016
Python script to migrate a Ghost blog to Hugo, including tags and banner images
View ghosttohugo.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
A simple program which migrates an exported Ghost blog to Hugo.
It assumes your blog is using the hugo-icarus theme, but should
work for any theme. The script will migrate your posts, including
tags and banner images. Furthermore, it will make sure that
all your old post urls will keep working by adding aliases to them.
The only thing you need to do yourself is copying the `images/`
@spacecowboy
spacecowboy / hphosts_pfsense.sh
Created Aug 25, 2015
Download hphosts file and convert it to squidGuard formatting.
View hphosts_pfsense.sh
#!/bin/bash
TEMPDIR=/tmp/hphostspfsense
# Move to temporary directory
mkdir -p $TEMPDIR
rm -rf $TEMPDIR/*
cd $TEMPDIR
View build-all-wheels.bat
:: Required: git, Visual Studio 10.0 Express, Visual Studio 9 Express,
:: Windows 7 SDK (.NET 4), Windows 7 SDK (.NET 3.5), Anaconda/Miniconda
:::::::::::::::::::::::::::::::::::
:: User configurable stuff start ::
:::::::::::::::::::::::::::::::::::
:: These depends on where you installed Anaconda.
:: Python2 or Python3 doesn't matter but you need both 32bit and 64bit versions.
set ANACONDA_BASE=C:\Users\YOURUSERNAME\Anaconda
View matplotlibrc
### MATPLOTLIBRC FORMAT
# This is a sample matplotlib configuration file - you can find a copy
# of it on your system in
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
# there, please note that it will be overridden in your next install.
# If you want to keep a permanent local copy that will not be
# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux
# like systems) and C:\Documents and Settings\yourname\.matplotlib
# (win32 systems).
@spacecowboy
spacecowboy / master.py
Created Sep 8, 2011
A simple proof of concept for building your own super computer in python, assuming you have access to many machines.
View master.py
from multiprocessing.managers import BaseManager
from mathenate import mathenate
#Define manager
class QueueManager(BaseManager): pass
QueueManager.register('get_job_queue')
QueueManager.register('get_result_queue')
#Connect to server
m = QueueManager(address=('my.computer.org', 50000), authkey='password')
@spacecowboy
spacecowboy / picasa_download.rb
Created Aug 9, 2011 — forked from jubo/picasa_download.rb
Backs up all the photos from Google Picasa Web Albums. Multithreaded
View picasa_download.rb
# Backs up all the photos from Google Picasa Web Albums.
#
# The script downloads the original version of the photos, and is not limited to
# 1600x1200 thumbnails.
#
# Author:: Victor Costan
# Copyright:: Copyright (C) 2010 Victor Costan
# License:: MIT
#
You can’t perform that action at this time.