Skip to content

Instantly share code, notes, and snippets.

@pallih
pallih / gist:3268835
Created August 6, 2012 01:22
Data journalism links - curated by Margot Williams - sourced from here: http://www.icij.is/?p=311
@pallih
pallih / gist:4127808
Created November 21, 2012 21:19
traceroute
3 157.157.255.182 (157.157.255.182) 18.927 ms 19.822 ms 18.710 ms
4 172.16.100.201 (172.16.100.201) 58.159 ms 57.956 ms 59.106 ms
5 te7-6.ccr01.lon02.atlas.cogentco.com (149.6.148.45) 64.739 ms 65.135 ms 64.808 ms
6 te0-2-0-2.ccr21.lon01.atlas.cogentco.com (130.117.1.217) 65.087 ms 65.881 ms 66.420 ms
7 te0-4-0-5.ccr21.lon13.atlas.cogentco.com (154.54.72.186) 66.304 ms
te0-1-0-5.mpd21.lon13.atlas.cogentco.com (154.54.72.190) 66.304 ms
te0-1-0-4.mpd21.lon13.atlas.cogentco.com (154.54.57.98) 65.507 ms
8 te0-1-0-4.ccr21.bos01.atlas.cogentco.com (154.54.1.93) 135.288 ms
te0-7-0-4.ccr21.jfk02.atlas.cogentco.com (154.54.84.125) 137.191 ms
te0-2-0-4.ccr21.bos01.atlas.cogentco.com (66.28.4.189) 135.905 ms
@pallih
pallih / gist:4651934
Created January 28, 2013 01:15
scramble & boggle algorithms
http://www.gtoal.com/scrabble/boggle.html
http://stackoverflow.com/questions/12237422/4x4-grid-of-letters-word-generator-scramble-with-friends
http://developmentality.wordpress.com/2012/05/30/solving-scramble-with-friends-a-tale-of-three-data-structures/
http://blog.scoompa.com/
http://stackoverflow.com/questions/746082/how-to-find-list-of-possible-words-from-a-letter-matrix-boggle-solver
http://allaboutalgorithms.wordpress.com/2012/04/07/boggle-solver/
http://exceptional-code.blogspot.com/2012/02/solving-boggle-game-recursion-prefix.html
http://everydayscripting.blogspot.com/2009/08/python-boggle-solver.html
http://dirkgorissen.com/2011/12/02/solving-boggle-with-python/
@pallih
pallih / mono.rb
Last active December 31, 2015 14:59 — forked from shtirlic/mono.rb
# http://www.mono-project.com/Compiling_Mono_on_OSX
# Version 3.2.5
require 'formula'
class Mono < Formula
url 'http://download.mono-project.com/sources/mono/mono-3.2.5.tar.bz2'
sha1 '1cd0bc34835f6e2fa48e03178324ee92a9ca91cb'
#url 'http://download.mono-project.com/sources/mono/mono-2.10.9.tar.bz2'
#sha1 '1a6e8c5a0c3d88d87982259aa04402e028a283de'
@pallih
pallih / gist:8434784
Created January 15, 2014 11:42
Bash function to randomize MAC address and hostname on OS X. Could live in ~/.bash_profile
function mask(){
# Changes MAC address to a random one and sets the hostname to a random word
# Tested on OS X 10.9 (Macbook Pro)
# Based on http://blog.kejsarmakten.se/all/software/2013/08/30/spoof-mac-on-osx.html
# and http://osxdaily.com/2010/09/06/change-your-mac-hostname-via-terminal/
# Note: neither are permanent (a reboot resets both)
# For a permanent change to hostname: sudo scutil –-set HostName NEWHOST
# Consider using SpoofMAC: https://github.com/feross/SpoofMAC
NEWMAC=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')
echo "Changing MAC " $(ifconfig en0 | grep ether)
@pallih
pallih / gist:8792836
Created February 3, 2014 21:32
SVEF verðlaunin, 2014 og opin gögn
Eins og allir vita þá unnum við Gunni Þorvalds ein af verðlaunum SVEF, seinasta föstudag fyrir vegvisir.is.
Afhendingin fór fram í Gamla Bíói og það var nóg af öli í boði. Sérstakur gestur var Ragnheiður Elín Árnadóttir, iðnaðar- og viðskiptaráðherra. Hún flutti ágæta ræðu um (m.a.) að hún væri mjög svo hrifin af þessum bransa og að hún vildi gjarnan fá leiðbeiningar frá þeim sem í honum starfa um hvernig hann gæti dafnað.
Við Gunni vorum tilfefndir í þremur flokkum af fjórtán og ég ætla ekkert að ljúga um það að ég bjóst við því að vinna í það minnsta einn þeirra. Ég hafði hugsað um það í strætóferðum dagana á undan hvað ég ætlaði að segja í þakkarræðunni. Þar átti helst að koma fram að Gunni hefði farið til Kosta Ríka fyrir nokkru síðan að fagna því sem allir vissu að yrði (VIÐ VINNUM!).
En það var semsagt öl í boði og mér leiðist almennt margmenni, þannig að þegar kom að því að við loksins unnum, þá hafði ég sett í mig þrjá bjóra og það var kominn svolítill dólgur í mig.
Þannig að ætlun mín um að þakk
Dæmi JSON sent á http://ums.mobile.conduit-services.com/usage/log í hvert appið Lögregluþjónninn er opnað í Android:
{
"usageHeader": {
"appId": "9410d4ef-1321-4b64-89c1-591f701a5950",
"appVersion": "4.1.0.7",
"deviceType": 2,
"deviceVariant": 0,
"latitude": null,
"longitude": null,
2a3,4
2a3,4
279c281
< PUBKEY_ADDRESS = 0,
---
> PUBKEY_ADDRESS = 23,
404a407,412
> enum
> {
> };
@pallih
pallih / gist:10773248
Created April 15, 2014 20:56
I'm looking for a band. Montana. Derby, UK, 2006.
Eftir fjóra tíma eru slétt átta ár frá því að ég var í Derby að þvælast með hljómsveitunum I Adapt og Gavin Portland. Þar spiluðum "við" á tónleikum með hljómsveit sem nefndist Montana. Mig langar að finna hana aftur. Afgangurinn af þessu verður á ensku til að liðka fyrir því að því að markmið náist.
In 2006, 8 years to the day (in 4 hours, I'm cheating) I was in Derby, UK. I was a roadie/driver for two Icelandic hardcore bands, I Adapt and Gavin Portland, on their UK tour.
It was a lot of fun. It was before I had children to take care of, it was before my decisions had started to (really) affect anybody but me. I was traveling a foreign country with friends, playing rockstars. And when I say rockstars it's in the sense that we slept on floors, we slept in cars, we argued, we hated each other, we got drunk, we traveled hundreds of miles hungover, we didn't eat anything remotely nutritous and we listened to a lot of Kelly Clarkson and Johnny Cash on the M1. And we played with a lot of shitty bands.
Now, I
@pallih
pallih / transition_statement.txt.asc
Created April 19, 2014 22:56
gpg key transition
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I am transitioning GPG keys from an old 2048-bit RSA key to a new
4096-bit RSA key. The old key will continue to be valid for some
time, but I prefer all new correspondance to be encrypted in the new
key, and will be making all signatures going forward with the new key.
This transition document is signed with both keys to validate the
transition.