Skip to content

Instantly share code, notes, and snippets.

View felixrabe's full-sized avatar
🦀
Focusing on Rust

Felix Rabe felixrabe

🦀
Focusing on Rust
View GitHub Profile
@felixrabe
felixrabe / Guide.md
Created September 27, 2014 09:50
Reverse SSH tunnel

Connect two machines on distinct networks via SSH

localhost below is meant to be used literally.

Topology example

laptop_srv  --  wifi_1
                        >  server

laptop_clt -- wifi_2

@felixrabe
felixrabe / Guide.md
Last active January 2, 2016 18:39
Connect Raspberry Pi via Ubuntu 12.04 and NAT to the Internet
  • Host system: Ubuntu 12.04 LTS with DHCP server: (root)

    • Interfaces:

        eth0 => Raspberry Pi
        wlan0 => Internet (WLAN access point)
      
    • Installation:

apt-get install isc-dhcp-server

@felixrabe
felixrabe / gist:ba665f80284a2d14bc55
Created September 19, 2014 22:46
Syntax explorations
result(fn1(in1, in2, in3), fn2(in4, in5))
result (fn1 in1 in2 in3) (fn2 in4 in5)
result
fn1 in1 in2 in3
fn2 in4 in5
result
fn1
@felixrabe
felixrabe / Dockerfile
Created August 8, 2014 17:48
Source code for my blog post "Simple Blog Deployment using Ghost and Docker"
# DOCKER-VERSION 1.1.2
FROM ubuntu:14.04
# Speed up apt-get according to https://gist.github.com/jpetazzo/6127116
RUN echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup
RUN echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache
# Update the distribution
ENV DEBIAN_FRONTEND noninteractive
@felixrabe
felixrabe / presentation
Last active August 29, 2015 14:03
Basel.js meetup presentation 2014-07-09 about the Ghost blogging platform (npm install -g coffee-script ; npm install chalk tiptip ; ./presentation)
#!/usr/bin/env coffee
tiptip = require 'tiptip'
chalk = require 'chalk'
contrastOk = yes
b = chalk.bold
g = chalk.grey
@felixrabe
felixrabe / provision.sh
Created July 2, 2014 18:15
Cyon Geekserver Provisionin Scaffold
#!/usr/bin/env bash
# Written by Felix Rabe (rabe.io).
# Hereby placed in the Public Domain. Use however you wish.
if [[ $# -eq 0 ]] ; then
echo "This script is for provisioning a Cyon Geekserver that has"
echo "been set up using Ubuntu 14.04. ONLY USE FOR A NEW SERVER!"
echo
echo "Usage example:"
@felixrabe
felixrabe / s
Last active August 29, 2015 14:03
Reliable subl wrapper
#!/usr/bin/env bash
if [[ $# -eq 0 ]] ; then
subl -w . &
else
subl -w "$@" &
fi
sleep 1
kill $!
@felixrabe
felixrabe / gitswap
Last active August 29, 2015 14:02
gitswap
#!/bin/bash
git branch swap-before &&
git reset head~2 &&
git add -A . && git c -C swap-before &&
git reset --hard swap-before~ &&
git reset head@{1} &&
git add -A . && git c -C swap-before~
@felixrabe
felixrabe / gulpfile.coffee
Created May 30, 2014 17:20
Gulpfile.coffee with conditionally suppressed [gulp] output
gulp = require 'gulp'
gutil = require 'gulp-util'
mocha = require 'gulp-mocha'
taskNameStartsWithMetaDash = false
for arg in process.argv[2..]
if arg.substr(0, 5) == 'meta-'
taskNameStartsWithMetaDash = true
break
// http://getbootstrap.com/examples/navbar-static-top/
navbar static
brand "Project name" (to "#")
item "Link" (to "#") active
item "Link" (to "#")
item "Link" (to "#")
item "Dropdown"
item "Action" (to "#")