Skip to content

Instantly share code, notes, and snippets.

Pelle Almquist peralmq

Block or report user

Report or block peralmq

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
peralmq / BoardGameGeek.kt
Last active Jan 10, 2016
BoardGameGeek API client in Kotlin
View BoardGameGeek.kt
import android.util.Xml
import org.xmlpull.v1.XmlPullParser
import java.util.*
data class BoardGame(val id: Int, val name: String?, val yearpublished: Int?)
data class BoardGames(val games: List<BoardGame>)
public class BoardGameGeek {
# Create a local database and populate with data from Heroku pg:backups
if [ $# != 2 ]; then
echo 1>&2 "usage: $0 BACKUP_ID APP_NAME"
exit 2
peralmq /
Created Apr 8, 2015
Oneliner for deleting all RabbitMQ connections.
# Probably only works for ZSH. Expects jq ( and node ( to be installed
# Replace <user>, <password>, and <host> to suit your needs.
URL="https://<user>:<password>@<host>"; for name in "${(@f)$(http $URL/api/connections | jq '.[]|.name')}"; do encoded=`node -e "console.log(encodeURIComponent($name))"`; http DELETE $URL/api/connections/$encoded; done

Keybase proof

I hereby claim:

  • I am peralmq on github.
  • I am peralmq ( on keybase.
  • I have a public key whose fingerprint is 7AA8 89CE 9F68 CA40 4128 4391 BCC4 3052 D4B3 32E0

To claim this, I am signing this object:

View S-Copy0.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.