Skip to content

Instantly share code, notes, and snippets.

View RobBlackwell's full-sized avatar

Robert Blackwell RobBlackwell

View GitHub Profile
@RobBlackwell
RobBlackwell / gist:4ed1aaf78154d386c4a2
Last active August 29, 2015 14:09
Common Lisp Notes

Use Quicklisp

http://www.quicklisp.org/

Use the SLIME provided with Quicklisp

(ql:quickload "quicklisp-slime-helper")

Update your Quicklisp

@RobBlackwell
RobBlackwell / gist:dc965da495b6ed3d5bb4
Created June 20, 2015 17:27
Markdown to PDF via Pandoc
pandoc briefing.md --latex-engine=xelatex -V papersize:"a4paper" -V geometry:margin=1in -V fontsize:12pt -o briefing.pdf
@RobBlackwell
RobBlackwell / gist:2520279
Created April 28, 2012 17:09
Sample Windows Azure diagnostics.wadcfg
<?xml version="1.0" encoding="utf-8" ?>
<DiagnosticMonitorConfiguration xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration" configurationChangePollInterval="PT1M" overallQuotaInMB="4096">
<DiagnosticInfrastructureLogs bufferQuotaInMB="1024"
scheduledTransferLogLevelFilter="Verbose"
scheduledTransferPeriod="PT1M" />
<Logs bufferQuotaInMB="1024"
scheduledTransferLogLevelFilter="Verbose"
scheduledTransferPeriod="PT1M" />
@RobBlackwell
RobBlackwell / SQLAzureExportSample.cs
Created April 12, 2012 08:45
Sample showing how to export a SQL Azure database to BACPAC format.
using System;
using System.IO;
using System.Net;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;
namespace SqlAzureBackup
{
class Program
@RobBlackwell
RobBlackwell / gist:8649897
Last active January 4, 2016 16:49
Richoramas Benchmark in Common Lisp
(ql:quickload "puri")
(defun test()
(loop for i from 0 to 1000000
collecting (puri:parse-uri "http://www.foo.com")))
(time (progn (test) t))
;;; 32 bit SBCL
@RobBlackwell
RobBlackwell / Richorama's benchmark in ANSI C
Last active January 4, 2016 19:09
Richorama's benchmark in ANSI C
#include <stdio.h>
#include <uriparser/Uri.h>
#include <time.h>
int main(void)
{
clock_t start = clock() / (CLOCKS_PER_SEC / 1000);
UriParserStateA state;
reb@HELIUM:~$ sudo apt-get install sbcl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libfreetype6 os-prober
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
binfmt-support
Suggested packages:
@RobBlackwell
RobBlackwell / eduroam
Last active March 17, 2017 11:01
eduroam UEA on x230 arch linux
Connection='wireless'
Interface=wlp58s0
Security='wpa-configsection'
Description="eduroam network"
IP='dhcp'
TimeoutWPA=30
WPAConfigSection=(
'ssid="eduroam"'
'key_mgmt=WPA-EAP'
'eap=PEAP'
nix-env -iA nixos.oraclejre8
Unfortunately, we cannot download file jdk-8u131-linux-x64.tar.gz automatically.
Please go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html to download it yourself, and add it to the Nix store
using either
nix-store --add-fixed sha256 jdk-8u131-linux-x64.tar.gz
or
nix-prefetch-url --type sha256 file:///path/to/jdk-8u131-linux-x64.tar.gz
@RobBlackwell
RobBlackwell / gist:e6b874b9b664d7496f4099bae3c363f4
Created January 31, 2018 17:14
Preserving your working directory in gnome-terminal
# including this ensures that new gnome-terminal tabs keep the parent `pwd` !
# https://ttboj.wordpress.com/2014/03/20/preserving-your-working-directory-in-gnome-terminal/
if [ -e /etc/profile.d/vte.sh ]; then
. /etc/profile.d/vte.sh
fi