Skip to content

Instantly share code, notes, and snippets.

View tfohlmeister's full-sized avatar

Thorben Fohlmeister tfohlmeister

View GitHub Profile
@molobrakos
molobrakos / gist:ff1620ce6031c99f120b
Last active January 31, 2018 10:46
using duplicity with hubic to backup home directory on ubuntu linux
# preparations
# ------------
# create a new application in hubic account manager
# visit https://hubic.com/home/browser/account/
# Developers > Add an application
# Name: backup
# Redirection domain: http://localhost/
# copy "Client ID" and "Secret Client", it will be used later
sudo apt-get install librsync-dev libffi-dev python-virtualenv python-swiftclient
@Cybso
Cybso / adblock.sh
Last active September 3, 2021 18:07 — forked from teffalump/README.md
#!/bin/sh
#Put in /etc/adblock.sh
#Script to grab and sort a list of adservers and malware
#Check proper DHCP config and, if necessary, update it
uci get dhcp.@dnsmasq[0].addnhosts > /dev/null 2>&1 || uci add_list dhcp.@dnsmasq[0].addnhosts=/etc/block.hosts && uci commit
#Leave crontab alone, or add to it
grep -q "/etc/adblock.sh" /etc/crontabs/root || echo "0 4 * * 0,3 sh /etc/adblock.sh" >> /etc/crontabs/root
@metaist
metaist / bootstrap-vertical-grid.css
Created November 24, 2013 21:06
Bootstrap vertical grid. For laying out full-screen fixed height webapps.
.container-fixed {
bottom: 0;
position: fixed;
left: 0;
right: 0;
top: 0;
}
.container-fixed .col {
height: 100%;
@Fiyorden
Fiyorden / gitlab_repo.rb
Last active February 29, 2020 11:42
Gitlab repo for dashing
#!/usr/bin/env ruby
require 'net/http'
require 'json'
gitlab_token = "YOUR TOKEN"
gitlab_uri = "URL GITLAB"
# number of repositories to display in the list
# order the list by the numbers
ordered = true
@youtalk
youtalk / redirect.http2https.js
Created July 31, 2012 12:42
Automatic redirection from HTTP to HTTPS with Node.js
app.configure(function () {
app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.cookieParser());
app.configure('production', function () {
app.use (function (req, res, next) {
var schema = (req.headers['x-forwarded-proto'] || '').toLowerCase();
if (schema === 'https') {