Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀

Thomas Hollstegge Tho85

🚀
View GitHub Profile
View Encbox.md

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption
View USBChristmasTree.ino
/*
The MIT License (MIT)
Copyright (c) 2013 thomasfredericks
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
@Tho85
Tho85 / duply.service
Created Nov 26, 2016
Duply systemd integration
View duply.service
[Unit]
Description=Duply backup
After=network.target
Wants=network.target
[Service]
Type=oneshot
ExecStart=/bin/true
ExecReload=/bin/true
View wc0030a.config
# OpenWRT build config for LogiLink WC0030A IP camera
# Automatically generated file; DO NOT EDIT.
# OpenWrt Configuration
#
CONFIG_MODULES=y
CONFIG_HAVE_DOT_CONFIG=y
# CONFIG_TARGET_ppc44x is not set
# CONFIG_TARGET_realview is not set
# CONFIG_TARGET_arm64 is not set
# CONFIG_TARGET_sunxi is not set
View uboot-log.txt
U-Boot 1.1.3 (Nov 18 2012 - 20:35:15)
Board: Ralink APSoC DRAM: 32 MB
relocate_code Pointer at: 81fb4000
spi_wait_nsec: 42
spi device id: ef 40 17 0 0 (40170000)
find flash: W25Q64BV
raspi_read: from:20000 len:1000
.raspi_read: from:20000 len:1000
.============================================
View airbrake.rb
# Don't verify SSL certificates
# Needed for https://exceptions.zweitagapps.com on Heroku
module Airbrake
class Sender
alias orig_setup_http_connection setup_http_connection
def setup_http_connection
orig_setup_http_connection.tap do |http|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if secure?
end
View .zshrc
# Activate vim mode
bindkey -v
bindkey "^e" emacs-editing-mode
# Map history backward search (Ctrl-R in emacs mode) to [command-mode]?
bindkey -M vicmd '?' history-incremental-search-backward
# Present a nice prompt
vim_ins_mode="%{%F{white}%}⎆"
vim_cmd_mode="%{%F{red}%}⌘"
View ssltool.patch
From dfa54b947815fdf1ba957c64bb4e489d041bbf3e Mon Sep 17 00:00:00 2001
From: Thomas Hollstegge <thomas.hollstegge@zweitag.de>
Date: Mon, 2 Sep 2013 18:07:47 +0200
Subject: [PATCH 1/2] Check all CNs when testing for domain name
---
lib/ssltool/certificate.rb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/ssltool/certificate.rb b/lib/ssltool/certificate.rb
View test.rb
require 'pry'
class FooBar
def hello
puts "world!"
end
end
puts Pry::WrappedModule.new(FooBar).source
# => "class FooBar\n def hello\n puts \"world!\"\n end\nend\n"
View deploy.rb
# Start SSH session on first available server
task :ssh do
hostname = find_servers_for_task(current_task).first
exec %Q|ssh -l #{user} #{hostname} -t '#{default_shell}'|
end
# Start Rails console on first available server
namespace :rails do
task :console, :roles => :app do
hostname = find_servers_for_task(current_task).first