Skip to content

Instantly share code, notes, and snippets.

@derchrisuk
derchrisuk / Lines_SBahn.geojson
Created October 15, 2017 21:05 — forked from leftshift/Lines_SBahn.geojson
Mvg Stations json and lines geojson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@derchrisuk
derchrisuk / HOWTO.md
Created August 22, 2017 03:26 — forked from cvan/HOWTO.md
How to serve a custom HTTPS domain on GitHub Pages with CloudFlare: *FREE*, secure and performant by default

Instructions

CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.

  1. Make sure you have registered a domain name.
  2. Sign up for CloudFlare and create an account for your domain.
  3. In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
  4. From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
  5. If you
@derchrisuk
derchrisuk / build_libusb_lion_64bit.sh
Created June 25, 2017 15:16 — forked from cdwilson/build_libusb_lion_64bit.sh
Rebuild libusb for OSX Lion 64-bit
#!/bin/sh
# If you're getting errors like:
#
# dyld: Library not loaded: /usr/local/lib/libusb-1.0.0.dylib
# Referenced from: /Users/cwilson/stow/bin/JLinkExe
# Reason: no suitable image found. Did find:
# /opt/local/lib/libusb-1.0.0.dylib: mach-o, but wrong architecture
# Trace/BPT trap: 5
@derchrisuk
derchrisuk / bareos.nix
Created October 16, 2016 14:14
Bareos Nix module
{ config, lib, pkgs, ... }:
with lib;
let
libDir = "/var/lib/bareos";
fd_cfg = config.services.bareos-fd;
fd_conf = if (fd_cfg.tls.enable)
interface eth0 {
AdvSendAdvert on;
MinRtrAdvInterval 3;
MaxRtrAdvInterval 10;
prefix <your_v6>::/64 {
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};
@derchrisuk
derchrisuk / gist:6a59f114dc4fac969f67
Created March 25, 2015 00:33
pootle local server traceback
2015-03-25 01:30:30,622 INFO Loading custom settings from '/root/.pootle/pootle.conf'...
2015-03-25 00:30:30,718 INFO Using Python PO
2015-03-25 00:30:30,779 INFO Starting CherryPy server, listening on port 8000
Traceback (most recent call last):
File "/var/www/pootle/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 109, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/var/www/pootle/local/lib/python2.7/site-packages/pootle/core/decorators.py", line 87, in wrapped
return func(request, path_obj, *args, **kwargs)
File "/var/www/pootle/local/lib/python2.7/site-packages/pootle/apps/pootle_app/views/index/index.py", line 143, in view
RequestContext(request))

Keybase proof

I hereby claim:

  • I am derchrisuk on github.
  • I am derchris (https://keybase.io/derchris) on keybase.
  • I have a public key whose fingerprint is 68C9 D596 0EBE 95A6 ACC2 FC85 1876 F436 E1A4 A59C

To claim this, I am signing this object:

@derchrisuk
derchrisuk / gist:8249549
Created January 4, 2014 00:26
Debian mounts
/dev/md1 on / type ext3 (rw)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/md0 on /boot type ext2 (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
$ gem list
*** LOCAL GEMS ***
activesupport (3.2.15)
bundle (0.0.1)
bundler (1.3.5)
CFPropertyList (2.2.0)
chipmunk (5.3.4.5)
file-tail (1.0.12)
@derchrisuk
derchrisuk / gist:7268871
Created November 1, 2013 17:31
Overviewer build Mac OSX 10.8
$ ./build.sh
running clean
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 487k 100 487k 0 0 194k 0 0:00:02 0:00:02 --:--:-- 209k
running build
running build_py
creating build
creating build/lib.macosx-10.8-x86_64-2.7
creating build/lib.macosx-10.8-x86_64-2.7/overviewer_core