Skip to content

Instantly share code, notes, and snippets.

View cwage's full-sized avatar

Chris Wage cwage

View GitHub Profile
boolean disableNether = config.getBoolean("disable_nether", false);
if (disableNether) {
plugin.getServer().getPluginManager()
.registerEvents(new NetherPortalListener(), plugin);
}
@cwage
cwage / lsd
Created February 3, 2018 17:18
cwage@portaplotz:~/bin$ cat lsd.sh
#!/bin/sh
while true; do
ls | nc -l 12345
done
root@portaptty:/etc/X11/Xsession.d# less 90gpg-agent
: ${GNUPGHOME=$HOME/.gnupg}
GPGAGENT=/usr/bin/gpg-agent
if grep -qs '^[[:space:]]*use-agent' "$GNUPGHOME/gpg.conf" "$GNUPGHOME/options" &&
test -x $GPGAGENT; then
# Invoking gpg-agent with no arguments exits successfully if the agent
# is already running on the standard socket
alias e="emacsclient -t -a ''"
alias eb="emacsbare"
alias ec="emacsclient -c -n -a ''"
alias emacsbare="emacs -nw -Q --eval \"(load-theme 'misterioso)\""
alias vim="e"
alias vi="e"
@cwage
cwage / -
Created November 14, 2016 02:05
return 0 unless ($ref->{'user'}->{'screen_name'} =~ /$userfilter/i);
return 0 if ($ref->{'text'} =~ /(rand|ron) paul|Hillary|Clinton|Cruz|Rubio|POTUS|bernie|sanders|trump/i);
@cwage
cwage / -
Created November 13, 2016 18:50
root@new:~/bin# ls -la /var/log
total 13360
drwxrwxr-x 10 root syslog 4096 Nov 13 03:26 .
drwxr-xr-x 12 root root 4096 Oct 21 2014 ..
-rw-r--r-- 1 root root 2388 Nov 7 07:06 alternatives.log
drwxr-x--- 2 root adm 4096 Nov 13 03:26 apache2
drwxr-xr-x 2 root root 4096 Nov 4 13:14 apt
-rw-r----- 1 syslog adm 0 Nov 13 03:26 auth.log
-rw-r----- 1 syslog adm 777576 Nov 12 19:05 auth.log.1
-rw-r----- 1 syslog adm 410502 Nov 6 03:26 auth.log.2.gz
@cwage
cwage / -
Created November 7, 2016 16:00
$ time grep abrt /var/log/messages > /dev/null
real 0m0.331s
user 0m0.299s
sys 0m0.031s
$ time awk '/abrt/ { print; }' /var/log/messages > /dev/null
real 0m5.162s
user 0m5.040s
@cwage
cwage / -
Created November 5, 2016 22:01
# puppet apply -v manifests/site.pp --modulepath=modules/ --noop --test
# puppet apply -v manifests/site.pp --modulepath=modules/
node default {
class { 'apache': }
# The non-ssl virtual host
apache::vhost { 'ssltest.quietlife.net non-ssl':
servername => 'ssltest.quietlife.net',