Skip to content

Instantly share code, notes, and snippets.

@pajp
pajp / com.f-secure.orspclient.plist
Created February 19, 2014 15:07
Mac ORSP launchd plist with debug logging enabled
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>InitGroups</key>
<false/>
<key>GroupName</key>
<string>daemon</string>
<key>Label</key>
<string>com.f-secure.orspclient</string>
@pajp
pajp / lights-set.js
Created March 4, 2014 08:50
node.js script to set all LIFX bulbs on or off, will keep on trying until 'expectedbulbs' number of lamps are in the desired state
var lifx = require('./lifx');
var util = require('util');
var lx = lifx.init();
var expectedbulbs = 2;
var target;
var bulbsAtTarget = [];
var startTime = new Date().getTime();
function processBulbState(address, powerstate) {
var atTarget = target ? powerstate > 0 : powerstate == 0;
if (atTarget) regBulbAtTarget(address);

Keybase proof

I hereby claim:

  • I am pajp on github.
  • I am pajp (https://keybase.io/pajp) on keybase.
  • I have a public key whose fingerprint is 9FFF 5FAC 43A0 D590 3B58 E7E4 F4C1 5A36 5E3D 8D51

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am pajp on github.
  • I am pajp (https://keybase.io/pajp) on keybase.
  • I have a public key whose fingerprint is DA73 AA92 1D95 1CBE CFC2 8B1E 9F2D 4844 DCA5 ACB4

To claim this, I am signing this object:

~/opensc-0.14.0$ MacOSX/build
+ test -x ./configure
+ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
cp_dmg() {
dmg="$1"
file="$2"
destination="$3"
mountpoint=$(hdiutil attach "$dmg" -nobrowse -plist|xpath '//key[.="mount-point"]/following-sibling::*[1]' 2> /dev/null|sed -e 's/<\/*string>//g')
cp "${mountpoint}/$file" "$destination"
hdiutil detach -quiet "$mountpoint"
}
### Keybase proof
I hereby claim:
* I am pajp on github.
* I am pajp (https://keybase.io/pajp) on keybase.
* I have a public key whose fingerprint is 06BE 9349 9DBA FE81 D8DF E6BD 3659 18D4 04C2 87D3
To claim this, I am signing this object:
@pajp
pajp / getimg.py
Created February 27, 2011 22:00 — forked from stchris/getimg.py
Gets the current image of the day from NASA and sets it as the background. The summary / description text is written to the image.
#!/usr/bin/env python
"""
getimg.py
Gets the current image of the day from NASA and sets it as the
background. The summary / description text is written
to the image.
Requires:
PIL (apt-get install python-imaging or pip install PIL)
@pajp
pajp / smartbudget.pl
Created July 5, 2011 06:00
nordea.fi -> smartbudget.se
#!/usr/bin/perl
#
# Script som omvandlar finska Nordeas transaktionslogg till ett format som
# är kompatibelt med bankimporten på smartbudget.se
# Använd med pbcopy för att placera resultatet i clipboard.
# (exportera transaktionerna under fliken "Transaktionsförteckning" i
# kontovyn på Nordeas nätbank)
#
# exempel:
#
@pajp
pajp / index.html
Created May 3, 2012 11:38 — forked from mbostock/.block
Mobile Patent Suits
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Mobile Patent Suits</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.29.1"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?1.29.1"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?1.29.1"></script>
<style type="text/css">