Skip to content

Instantly share code, notes, and snippets.

View chrisferry's full-sized avatar

Chris Ferry chrisferry

  • Chris Ferry Consulting
  • Brooklyn NY
View GitHub Profile
@sanderploegsma
sanderploegsma / postdownload.sh
Created October 12, 2014 15:12
Force CouchPotato rescan after download completion
#! /bin/bash
# postdownload.sh by Sander Ploegsma
{
CP_API_KEY="apikeyhere"
CP_HOST="<ip>:<port>"
echo $(date +%Y-%m-%d\ %H:%M:%S) "Forcing CouchPotato rescan..."
curl --silent -X POST "http://$CP_HOST/api/$CP_API_KEY/renamer.scan" > /dev/null
echo $(date +%Y-%m-%d\ %H:%M:%S) "Done."
}
@runion
runion / getExpiringDomains.php
Created October 18, 2012 20:14
A CRON job that emails me a list of domains set to expire the next day
<?php
$tomorrow = mktime(0, 0, 0, date("m"), date("d")+1, date("Y"));
$tomorrow_egrep = date('n/j/Y', $tomorrow); # like "10/19/2012" without quotes
$shellCommands= <<<END
rm ~/temp/PoolDeletingDomainsList.zip ~/temp/PoolDeletingDomainsList.txt ~/temp/email_tmp.txt ~/temp/tomorrow.txt;
wget http://www.pool.com/Downloads/PoolDeletingDomainsList.zip -O ~/temp/PoolDeletingDomainsList.zip -q;
unzip -o ~/temp/PoolDeletingDomainsList.zip -d ~/temp/;
egrep -e "{$tomorrow_egrep}" ~/temp/PoolDeletingDomainsList.txt > ~/temp/tomorrow.txt;
@smougenot
smougenot / A_Logstash.conf
Created July 26, 2012 13:59
Logstash Multiline Filter for Java Stacktrace (tested on field)
# stacktrace java as one message
multiline {
#type => "all" # no type means for all inputs
pattern => "(^.+Exception: .+)|(^\s+at .+)|(^\s+... \d+ more)|(^\s*Caused by:.+)"
what => "previous"
}
@jbfavre
jbfavre / ubuntu_precise_ec2_post_install
Created July 25, 2012 12:55
Ubuntu 12.04 Precise post install on AWS EC2
aptitude -y purge accountsservice acpid apport apport-symptoms apt-transport-https apt-xapian-index at busybox-static byobu cloud-initramfs-growroot cloud-initramfs-rescuevol console-setup curl dbus dmidecode dosfstools ed eject fonts-ubuntu-font-family-console friendly-recovery ftp fuse geoip-database gettext-base gir1.2-glib-2.0 gir1.2-gudev-1.0 grub-common grub-gfxpayload-lists grub-pc grub-pc-bin grub2-common hdparm iptables iputils-ping iputils-tracepath irqbalance iw kbd keyboard-configuration krb5-locales landscape-client landscape-common language-selector-common laptop-detect libaccountsservice0 libcap-ng0 libcurl3 libdate-manip-perl libdbus-glib-1-2 libevent-2.0-5 libfreetype6 libfuse2 libgc1c2 libgirepository-1.0-1 libgudev-1.0-0 libiw30 libjs-jquery libnfnetlink0 libparted0debian1 libpcap0.8 libpci3 libpolkit-gobject-1-0 libsasl2-modules libusb-1.0-0 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 libyaml-syck-perl logwatch lshw lsof ltrace memtest86+ mlocate nano ntfs-3g os-prober