Skip to content

Instantly share code, notes, and snippets.

@nifgraup
nifgraup / mailpile-wine-env.sh
Last active May 2, 2017 17:20
Script to setup Mailpile Wine environment
View mailpile-wine-env.sh
#!/bin/bash
# Assuming Mailpile is current directory
# Basic 32-bit Python-in-Wine environment
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.6
wget -N http://python.org/ftp/python/2.7.5/python-2.7.5.msi
wine msiexec /i python-2.7.5.msi /quiet
@nifgraup
nifgraup / rsakey.py
Created November 19, 2012 00:17 — forked from cosu/rsakey.py
Toy script to create a RSA key from scratch
View rsakey.py
__author__ = 'cdumitru'
from Crypto.Cipher import PKCS1_OAEP
from Crypto.PublicKey import RSA
import gmpy
import base64
#tup (tuple) - A tuple of long integers, with at least 2 and no more than 6 items. The items come in the following order:
#RSA modulus (n).
@nifgraup
nifgraup / gendiff.sh
Created February 5, 2012 18:29
remove current bus-stops, create a OSM changeset file
View gendiff.sh
#!/bin/sh
#remove current bus stops
osmosis --read-pbf file="iceland.osm.pbf" --tag-filter reject-nodes highway=bus_stop --write-pbf file="iceland-no-busstops.osm.pbf"
#generate change file
osmosis --read-pbf file="iceland-no-busstops.osm.pbf" --read-pbf file="iceland.osm.pbf" --derive-change --write-xml-change file="iceland-no-busstops.osc"
@nifgraup
nifgraup / lukrstats.sh
Created December 26, 2011 03:13
statistics on lukr importing, year later.
View lukrstats.sh
#/bin/bash
wget --timestamping http://download.geofabrik.de/osm/europe/iceland.osm.pbf
osmosis --read-pbf file=iceland.osm.pbf --way-key-value keyValueList=source.lukr --used-node --write-xml lukr.osm
osmosis --read-xml file=lukr.osm --way-key keyList=highway --used-node --write-xml lukrhighways.osm
xmllint --xpath '/osm/way/@user' lukrhighways.osm | grep -o user=\"[^\"]*\" > users.txt
echo "Skipting þeirra sem síðust breyttu lukr vegum:"
sort users.txt | uniq -c | sort -nr
echo "Fjöldi lukr vega sem búið er að staðfesta: `wc -l users.txt`"
@nifgraup
nifgraup / osmnames.pl
Created December 5, 2010 23:36
Script to list streets in Iceland based on their postal code and another to list streets in Iceland. Will later combine those to check what streets in Iceland are missing.
View osmnames.pl
#!/usr/bin/perl
# Author: Björgvin Ragnarsson
# License: Public Domain
use OSM::osm; # PERL osm module by gary68
openOsmFile('Iceland.osm');
skipNodes();
View git-icelandic.mkdn

Þýðing á Git á íslensku

Þetta eru glósur sem varða þýðingu Git á íslensku.

Grunnhugtök

Grunnhugtök í Git eru þessi:

  • The SHA Summa, t.d. "summan er deadbeef"
@nifgraup
nifgraup / README
Created August 19, 2010 18:04 — forked from avar/README
View README
Ride the city .po