Skip to content

Instantly share code, notes, and snippets.

View drscream's full-sized avatar
🕶️
Focusing

Thomas Merkel drscream

🕶️
Focusing
View GitHub Profile
$NetBSD$
Remove old SOLARIS verify code that didn't work anymore in new versions
--- src/main.cc.orig 2010-03-25 15:47:02.000000000 +0000
+++ src/main.cc
@@ -141,21 +141,6 @@ int main(int argc, char **argv, char **e
Ref<Array<StringBase> > addFile(new Array<StringBase>());
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012
The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
NetBSD 6.1.3 (GENERIC)
total memory = 3838 MB
avail memory = 3711 MB
timecounter: Timecounters tick every 10.000 msec
#!/sbin/runscript
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
[[ -z "${PIDFILE}" ]] && PIDFILE="/var/run/gunicorn/${SVCNAME}.pid"
[[ -z "${BINARY}" ]] && BINARY="/usr/bin/gunicorn"
depend() {
need net
bash-4.2# pcictl /dev/pci0 list
000:00:0: AMD RS880 Host Bridge (host bridge)
000:01:0: AMD RS780 PCI-PCI Bridge (int gfx) (PCI bridge)
000:04:0: AMD RS780 PCI-PCIE Bridge (port 0) (PCI bridge)
000:05:0: AMD RS780 PCI-PCIE Bridge (port 1) (PCI bridge)
000:17:0: ATI Technologies SB700/SB800 SATA Controller (AHCI mode) (SATA mass storage, interface 0x01)
000:18:0: ATI Technologies SB700/SB800 USB OHCI Controller (USB serial bus, interface 0x10)
000:18:2: ATI Technologies SB700/SB800 USB EHCI Controller (USB serial bus, interface 0x20)
000:19:0: ATI Technologies SB700/SB800 USB OHCI Controller (USB serial bus, interface 0x10)
000:19:2: ATI Technologies SB700/SB800 USB EHCI Controller (USB serial bus, interface 0x20)
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name otp.sh www.otp.sh;
return 301 https://otp.sh$request_uri;
}
server {
listen 443 default_server ssl;
listen [::]:443 default_server ssl;
#!/bin/bash
WORKDIR='/opt/local/etc/openvpn'
OPENVPN='/opt/local/sbin/openvpn'
function openvpn_start() {
for config in ${WORKDIR}/*.conf; do
name=$(basename ${config//.conf})
echo "Starting OpenVPN: ${name}"
${OPENVPN} --config ${config} --daemon ${name}
## pssh: http://code.google.com/p/parallel-ssh/
## i=interactive
function psshi() {
local -a psshopts=( -p 10 -t 0 -X "-q" -X "-T" -O LogLevel=INFO )
local psshdir="${HOME}/.pssh"
local hostfile="${psshdir}/hostgroups/${1}"; shift
[[ ! -d "${psshdir}" ]] && return 2
[[ ! -f "${hostfile}" || ! -s "${hostfile}" ]] && return 2
[[ -z "${@}" ]] && return 2
pssh "${psshopts[@]}" -h "${hostfile}" -i "${@}"

Keybase proof

I hereby claim:

  • I am drscream on github.
  • I am tm (https://keybase.io/tm) on keybase.
  • I have a public key whose fingerprint is 9109 359F B693 2264 0D89 6331 12AE 4593 D7A6 3833

To claim this, I am signing this object:

client
dev tap
proto udp
remote vpn.frubar.net 1194
resolv-retry infinite
nobind
user nobody
#group nobody
#Activate this for DEBIAN/UBUNTU Systems
group nogroup
@drscream
drscream / VIM-Launcher.applescript
Created July 6, 2014 14:22
Automater script to open VIM with Finder.app
on run {input}
set the_path to POSIX path of input
-- run vim command and exit Terminal.app after close
set cmd to "vim " & quoted form of the_path & "; exit"
tell application "System Events" to set terminalIsRunning to exists application process "Terminal"
tell application "Terminal"
-- Open new Tab if Terminal.app is already running
if terminalIsRunning is true then
activate
tell application "System Events" to tell process "Terminal" to keystroke "t" using command down