Skip to content

Instantly share code, notes, and snippets.

View toke's full-sized avatar

Thomas Kerpe toke

View GitHub Profile
service {
dhcp-server {
disabled false
dynamic-dns-update {
enable true
}
global-parameters "key rndc-key { algorithm HMAC-MD5; secret paste_your_ddns_secret_here; };"
global-parameters "zone home.local. { primary 10.1.2.2; key rndc-key; }"
global-parameters "ddns-domainname "home.local.";"
global-parameters "ddns-rev-domainname "in-addr.arpa.";"
@toke
toke / random_name.rb
Created February 23, 2016 12:59 — forked from monkbroc/random_name.rb
Random thingy name generator, like pleasant_cat and smooth_duck
#!/usr/bin/env ruby
require 'highline/import'
ADJECTIVES = %w(
broad crooked curved deep even flat hilly jagged round shallow square
steep straight thick thin triangular uneven average big fat gigantic
huge large little long massive medium miniature narrow petite short
skinny small tall tiny wide cooing deafening faint harsh hissing hushed
husky loud melodic mute noisy purring quiet raspy screeching shrill
@toke
toke / In case of fire.svg
Created February 23, 2016 12:58 — forked from monkbroc/In case of fire.svg
In case of fire
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@toke
toke / 50-particle.rules
Created February 23, 2016 12:47 — forked from monkbroc/50-particle.rules
Udev rules for Particle devices
# UDEV Rules for Particle boards
#
# This will allow reflashing with DFU-util without using sudo
#
# The latest version of this file may be found at:
# https://gist.github.com/monkbroc/b283bb4da8c10228a61e
#
# This file must be placed at:
#
# /etc/udev/rules.d/50-particle.rules (preferred location)

Reverse proxy over 3G modem (draft)

We will explain how to configure a cubieboard running debian as a reverese proxy. The modules that will be used are wvdial and autossh

Credits goes to:

1. http://blog.rootshell.be/2015/02/19/my-little-pwnie-box/
2. https://wiki.archlinux.org/index.php/3G_and_GPRS_modems_with_pppd
FROM debian:wheezy
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
RUN groupadd -r postgres && useradd -r -g postgres postgres
RUN apt-get update && apt-get install -y curl
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' > /etc/apt/sources.list.d/pgdg.list
RUN curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal