Skip to content

Instantly share code, notes, and snippets.

View DuncanHills's full-sized avatar

Duncan Hills Coffee Company DuncanHills

  • Batsfjord, Norway
View GitHub Profile
@DuncanHills
DuncanHills / nginx.conf
Created January 7, 2018 23:23 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
#!/bin/bash
# Installs the XCode command line tools if you don't have them
xcode-select --install
# Installs brew if you don't have it
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Makes your account the owner of /usr/local, which is preferred on single user Macs
sudo chown -R `whoami` /usr/local
# Installs all the dependencies for building libtorrent and rtorrent
brew install automake libtool boost curl lzlib libsigc++ openssl pkg-config xmlrpc-c
# Uninstall libtorrent-rasterbar if you already have it

Keybase proof

I hereby claim:

  • I am duncanhills on github.
  • I am atom (https://keybase.io/atom) on keybase.
  • I have a public key ASCbxrCJ87Vu1wCeWdZxovHX3AwgJ89Q5tTRPZZN7-YtNwo

To claim this, I am signing this object:

@DuncanHills
DuncanHills / fourkind.py
Last active August 29, 2015 14:01 — forked from philihp/fourkind.py
from collections import defaultdict
from collections import defaultdict
n = 8
k = 4
good = 0;
for x in xrange(10**n - 1):
s = str(x).zfill(8);
@DuncanHills
DuncanHills / conarylabels.sh
Created April 29, 2014 16:34
find all conary labels on the current machine
conary q --labels | sed -n -e 's/.*=\(.*\)\/.*/\1/p' | sort | uniq
@DuncanHills
DuncanHills / 1.1 — Q1
Last active August 29, 2015 14:00
Python Training Excercises
Given an integer n, generate a matrix of size n*n that contains a spiral of incrementing values from the outside to the inside.