Skip to content

Instantly share code, notes, and snippets.

View binnisb's full-sized avatar

Brynjar Smári Bjarnason binnisb

View GitHub Profile

Keybase proof

I hereby claim:

  • I am binnisb on github.
  • I am binnisb (https://keybase.io/binnisb) on keybase.
  • I have a public key ASB9Nl_MZVg3WEnhOo6QfHx40OvB_9-47VsPr-ChIaO1Mgo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am binnisb on github.
  • I am binnisb (https://keybase.io/binnisb) on keybase.
  • I have a public key whose fingerprint is B56E AF82 D5FE DBB6 5231 48AB 58F3 3418 BD22 C2CB

To claim this, I am signing this object:

@binnisb
binnisb / gist:a99562d83655aaff2d8b
Created August 29, 2014 11:32
mailpile encryption keys error
Exception happened during processing of request from ('127.0.0.1', 42042)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 593, in process_request_thread
self.finish_request(request, client_address)
File "/home/binni/Programming/vc-cloned/Mailpile/mailpile/httpd.py", line 424, in finish_request
SimpleXMLRPCServer.finish_request(self, request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 649, in __init__
self.handle()
@binnisb
binnisb / Cinnamon_panel_autohide.sh
Created June 3, 2014 23:25
Script to toggle autohide of cinnamon panel. Useful to check the clock etc
#!/bin/bash
function autohide() {
local AUTOHIDE=$(gsettings get org.cinnamon panel-autohide)
local set_autohide="gsettings set org.cinnamon panel-autohide"
if [ $AUTOHIDE == "true" ]; then
eval $set_autohide" false"
else
eval $set_autohide" true"
fi
}
@binnisb
binnisb / Entrez
Created April 3, 2014 13:35
Entrez
wq = Entrez.read(Entrez.post(db="cdd", id="224574", rettype="gb",retmode="text"))
record1 = Entrez.read(Entrez.efetch(db="cdd", rettype="docsum", webenv=wq["WebEnv"], query_key=wq["QueryKey"]))
#All these programs should print the following to stdout:
#70330367711422815821835254877183549770181269836358732742604905087154537118196933579742249494562611733487750449241765991088186363265450223647106012053374121273867339111198139373125598767690091902245245323403501
#The C program prints
#9079565065540428013
$ gcc fib.c -o fib -O3 -std=c99
$ ./fib
#fib.c
--------------------------------
#include<stdio.h>