Skip to content

Instantly share code, notes, and snippets.

View jordemort's full-sized avatar

Jordan Webb jordemort

View GitHub Profile
@jordemort
jordemort / Makefile
Created September 17, 2015 03:09
i2pd Makefile that doesn't work
include $(TOPDIR)/rules.mk
PKG_NAME:=i2pd
PKG_VERSION:=0.10.0
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/i2pd-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_VERSION).tar.gz
PKG_SOURCE_URL=https://github.com/PurpleI2P/i2pd/archive
PKG_MD5SUM:=4889026c2d051bacb24b67925f8ceada
@jordemort
jordemort / keybase.md
Created September 18, 2015 03:33
Keybase.io verification

Keybase proof

I hereby claim:

  • I am jordemort on github.
  • I am jordemort (https://keybase.io/jordemort) on keybase.
  • I have a public key whose fingerprint is B7F9 C8AA A8C1 13BA 8FA6 0EFD 26F4 1A1C 158F ACBF

To claim this, I am signing this object:

@jordemort
jordemort / gist:3253854
Created August 4, 2012 03:08
Prosody logging config
log = {
-- Log all error messages to prosody.err
error = "/var/log/prosody/prosody.err";
-- Log everything of level "info" and higher (that is, all except "debug" messages)
-- to prosody.log
debug = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for more verbose logging
--"*syslog"; -- Uncomment this for logging to syslog
}
@jordemort
jordemort / -
Created December 16, 2015 20:00
Testing the gist command-line tool
root@localhost:/# systemctl status haproxy
● haproxy.service - LSB: fast and reliable load balancing reverse proxy
Loaded: loaded (/etc/init.d/haproxy)
Active: active (running) since Tue 2016-03-15 15:35:55 UTC; 2s ago
Process: 4510 ExecStart=/etc/init.d/haproxy start (code=exited, status=0/SUCCESS)
CGroup: /user.slice/user-1000.slice/session-900.scope/system.slice/haproxy.service
└─4514 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
Mar 15 15:35:55 localhost systemd[1]: Starting LSB: fast and reliable load balancing reverse proxy...
Mar 15 15:35:55 localhost haproxy[4510]: Starting haproxy: haproxy.
root@localhost:/# systemctl start haproxy
root@localhost:/# systemctl status haproxy
● haproxy.service - LSB: fast and reliable load balancing reverse proxy
Loaded: loaded (/etc/init.d/haproxy)
Active: active (exited) since Tue 2016-03-15 15:35:55 UTC; 2min 1s ago
Process: 4645 ExecReload=/etc/init.d/haproxy reload (code=exited, status=0/SUCCESS)
Process: 4510 ExecStart=/etc/init.d/haproxy start (code=exited, status=0/SUCCESS)
Mar 15 15:35:55 localhost systemd[1]: Starting LSB: fast and reliable load balancing reverse proxy...
Mar 15 15:35:55 localhost haproxy[4510]: Starting haproxy: haproxy.
root@localhost:/# /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root@localhost:/# ps aux | grep haproxy
haproxy 4674 0.0 0.1 41604 8624 ? Ss 15:39 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -D -p /var/run/haproxy.pid
root 4680 0.0 0.0 12728 2120 ? R+ 15:39 0:00 grep haproxy
root@localhost:/#
Could not create file because a Git pre-receive hook failed.
hook1.sh: failed with exit status 32
+ chroot=/data/user/git-hooks/environments/1/28a80ad7246678ceff76a283c4f8ff682455fc2386dae7bad7b4fd941e2d854e
+ repo=/data/user/repositories/c/nw/c2/0a/d4/12/12.git
+ script_path=/data/user/git-hooks/repos/9
+ whoami
+ [ git = root ]
+ exec sudo -u root /usr/local/share/enterprise/ghe-firejail /data/user/git-hooks/environments/1/28a80ad7246678ceff76a283c4f8ff682455fc2386dae7bad7b4fd941e2d854e /data/user/repositories/c/nw/c2/0a/d4/12/12.git /data/user/git-hooks/repos/9 hook1.sh
+ chroot=/data/user/git-hooks/environments/1/28a80ad7246678ceff76a283c4f8ff682455fc2386dae7bad7b4fd941e2d854e
10.0.1.1 IN A 10.0.1.1
*.10.0.1.1 IN A 10.0.1.1
10.0.1.2 IN A 10.0.1.2
*.10.0.1.2 IN A 10.0.1.2
10.0.1.3 IN A 10.0.1.3
*.10.0.1.3 IN A 10.0.1.3
10.0.1.4 IN A 10.0.1.4
*.10.0.1.4 IN A 10.0.1.4
10.0.1.5 IN A 10.0.1.5
*.10.0.1.5 IN A 10.0.1.5
@jordemort
jordemort / lxc-attach.diff
Created October 26, 2017 19:47
Attempt to allow lxc-attach to attach to running containers
diff -dpru lxc-2.0.9/src/lxc/tools/lxc_attach.c lxc-2.0.9.attach/src/lxc/tools/lxc_attach.c
--- lxc-2.0.9/src/lxc/tools/lxc_attach.c 2017-10-19 12:13:25.000000000 -0500
+++ lxc-2.0.9.attach/src/lxc/tools/lxc_attach.c 2017-10-25 14:41:27.263268277 -0500
@@ -431,8 +431,8 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
- if (!c->is_defined(c)) {
- fprintf(stderr, "Error: container %s is not defined\n", c->name);
+ if (!(c->is_defined(c) || c->is_running(c))) {