This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A wrapper for IO.popen that returns the combined stdout and stderr. | |
# An exception is thrown if the subprocess exists with non-zero. | |
# by Julian Kornberger | |
module Subprocess | |
class Error < ::StandardError | |
attr_reader :status, :output | |
def initialize(args, status, output) | |
super "Subprocess #{args.inspect} exited with status #{status}:\n#{output}" | |
@status = status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
sudo apt-get -y install git-core g++ apache2 libapr1-dev libaprutil1-dev patch binutils make devscripts | |
git clone https://github.com/eousphoros/mod-spdy.git | |
cd mod-spdy/src | |
./build_modssl_with_npn.sh | |
chmod +x ./build/gyp_chromium | |
make BUILDTYPE=Release | |
cp ./out/Release/libmod_spdy.so /usr/lib/ | |
cp mod_ssl.so /usr/lib/apache2/modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require("write_key.inc.php"); | |
$result = write_key($_GET['name'], $_GET['key'], $_GET['mac']); | |
if(!$result) | |
header("Status: 422 Unprocessable Entity"); | |
?> | |
<!DOCTYPE html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Update no-ip.com und tunnelbroker simultaneously (dyndns) | |
error_reporting(E_ALL); | |
$key = "secret-key"; | |
$addr = isset($_GET['addr']) ? $_GET['addr'] : $_SERVER['REMOTE_ADDR']; | |
if($_GET['key'] != $key){ | |
header("Status: 401 Unauthorized"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/capistrano/tasks/sidekiq.rake | |
namespace :load do | |
task :defaults do | |
set :sidekiq_role, ->{ :app } | |
end | |
end | |
namespace :sidekiq do | |
def for_each_process(command) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
if [ "$#" = "0" ]; then | |
echo "missing hosts" | |
exit 1 | |
fi | |
for host in $@; do | |
inet=`dig +short a $host` | |
inet6=`dig +short aaaa $host` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/config/network | |
config interface 'loopback' | |
option ifname 'lo' | |
option proto 'static' | |
option ipaddr '127.0.0.1' | |
option netmask '255.0.0.0' | |
config globals 'globals' | |
option ula_prefix 'fdaa:ec6b:a862::/48' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mechanize' | |
class Pluscard | |
START = 'https://www.pluscard.de/kris/anmeldung/anmeldung.php' | |
Entry = Struct.new(:number,:buchungsdatum,:belegdatum,:betrag,:text) | |
def initialize(username,password) | |
@username = username |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uci del network.port2 | |
uci del network.port3 | |
uci del network.port4 | |
uci del network.port5 | |
uci del network.port2_vlan | |
uci del network.port3_vlan | |
uci del network.port4_vlan | |
uci del network.port5_vlan | |
uci del network.office_vlan | |
uci set network.wan.ifname=eth0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sample configuration file for an installation using pc-sysinstall | |
installMode=fresh | |
installInteractive=no | |
# Set if we are installing via optical, USB, or FTP | |
installType=FreeBSD | |
installMedium=usb | |
# List our components to install | |
installComponents=ports |
OlderNewer