Skip to content

Instantly share code, notes, and snippets.

Avatar

Love Billingskog Nyberg jacksoncage

View GitHub Profile
View route53DynDNS.bash
#!/bin/bash
#
# This script requires xpath to parse part of the dnscurl.pl output
# on CentOS/RedHat/Amazon Linux:
#
# sudo yum install perl-XML-XPath
#
# also, dnscurl.pl (from http://aws.amazon.com/code/Amazon-Route-53/9706686376855511)
# expects your secrets to be in ~/.aws-secrets
# using a file format like this (from http://dmz.us/wp/wp-content/uploads/r53/aws-secrets.txt)
@jacksoncage
jacksoncage / .bachrc
Created Oct 6, 2012
bashrc, tips and tricks to make every day life easier
View .bachrc
## multi-line prompt
PS1='
[\d \t \u@\h:\w ]
$> '
## aliases
alias cd..="cd .."
alias l="ls -al"
alias lp="ls -p"
alias ll="ls -lahG"
@jacksoncage
jacksoncage / jenkins-slave
Created Oct 3, 2012 — forked from bols-blue/jenkins-slave
jenkisn daemon script for viates /etc/init.d/jenkins-slave and /etc/default/jenkins-slave
View jenkins-slave
# defaults for jenkins continuous integration server
JENKINS_ARGS="-jnlpUrl https://test.viaplay.tv/jenkins/computer/SLAVENAME/slave-agent.jnlp"
# jenkins home location
JENKINS_HOME=/opt/jenkins-slave
# location of the jenkins war file
JENKINS_WAR=$JENKINS_HOME/slave.jar
# pulled in from the init script; makes things easier.
NAME=jenkins
@jacksoncage
jacksoncage / evilcode.sh
Last active Oct 7, 2015
Shell script to look for evil code and mail if detected
View evilcode.sh
#!/bin/bash
# Shell script to look for evil code and mail if detected
# -------------------------------------------------------------------------
# http://serverfault.com/questions/153666/send-email-based-on-grep-results
# http://www.linuxforums.org/forum/red-hat-fedora-linux/166780-shell-script-send-email.html
# -------------------------------------------------------------------------
WHERE="/home/"
TMP="/tmp/webinject_result.txt"
@jacksoncage
jacksoncage / logerror.sh
Created Jul 9, 2012
Shell script to look for error in log web server log files
View logerror.sh
#!/bin/bash
# Shell script to look for error in log web server log files
# -------------------------------------------------------------------------
# http://www.linuxforums.org/forum/red-hat-fedora-linux/166780-shell-script-send-email.html
# -------------------------------------------------------------------------
tail -f -n0 <log-filename> | while read line ; do
if [ $(echo $line | grep -i 'ERROR' | wc -l) != 0 ]; then
(echo "Subject: Fix: Web Server Error"; echo; echo $line) | mail adm@lovemusic.se
fi
@jacksoncage
jacksoncage / HeartBleed-Debian-Wheezy-Update-OpenSSL-1.0.1e-2+deb7u4.sh
Last active Sep 2, 2015
HeartBleed-Debian-Wheezy-Update-OpenSSL-1.0.1e-2+deb7u4.sh
View HeartBleed-Debian-Wheezy-Update-OpenSSL-1.0.1e-2+deb7u4.sh
# Debian Wheezy - Fixing HeartBleed
# Installing 1.0.1e-2+deb7u4
# http://www.corsac.net/?rub=blog&post=1565
# https://security-tracker.debian.org/tracker/DSA-2896-1
#
# As pointed out, not the best secured way but fast. Please use 'apt-get && apt-get upgrade' for a more secure system.
MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
wget http://security.debian.org/pool/updates/main/o/openssl/libssl1.0.0-dbg_1.0.1e-2+deb7u5_amd64.deb
View keybase.md

Keybase proof

I hereby claim:

  • I am jacksoncage on github.
  • I am jacksoncage (https://keybase.io/jacksoncage) on keybase.
  • I have a public key whose fingerprint is 24BE D167 F802 EB0D B75D 1887 C19F 9F3F 783B 4CBF

To claim this, I am signing this object: