This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BACKUP_PATH=/home/USERNAME/backups/jenkins | |
JENKINS_HOME=/var/lib/jenkins | |
#java -jar /var/lib/jenkins/jenkins-cli.jar -s http://ci.domain.tld quiet-down | |
wget --auth-no-challenge --http-user=user --http-password=apiToken http://localhost:8080/quietDown?token=INSERTTOKEN | |
mkdir -vp $BACKUP_PATH/`date '+%Y%m%d'` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BACKUP_PATH=/home/username/backups/jenkins | |
DATE=`date '+%Y%m%d'` | |
cd $PATH | |
tar -xvf logs.tgz -C $BACKUP_PATH | |
tar -xvf users.tgz -C $BACKUP_PATH | |
tar -xvf usercontent.tgz -C $BACKUP_PATH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo Checking current Jenkins version... | |
# Read X-Jenkins HTTP header info | |
echo Checking for latest Jenkins release... | |
# http://updates.jenkins-ci.org/latestCore.txt | |
# echo Checking for jobs in queue before updating... | |
# http://localhost:8080/jenkins/queue/api/xml or http://localhost:8080/jenkins/queue/api/json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Quick-fix for the 6/30/12 leap second bug | |
if [ ! -f /tmp/leapsecond_2012_06_30 ]; then | |
/etc/init.d/ntp stop; date -s "`date`" && /bin/touch /tmp/leapsecond_2012_06_30 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$resource = XenAPI::getResource(1); | |
echo json_encode($resource); | |
class XenAPI | |
{ | |
private static $isset = FALSE; | |
private static $xf_dir; | |
private static $modules = array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class GmailReader { | |
var $mbox; | |
function GmailReader($user, $pass) { | |
$this->mbox = imap_open("{imap.gmail.com:993/imap/ssl}INBOX",$user,$pass) | |
or die("Can't connect: " . imap_last_error()); | |
} | |
function openSentMail() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//error_reporting(E_ALL); | |
//ini_set("display_errors", 1); | |
include_once('gmail.php'); | |
$gmail = new GmailReader('[email protected]', 'asecurepassword'); | |
$gmail->openMailBox('Avast'); | |
$email = $gmail->getEmailSince('Fri, 5 Sep 2008 9:00:00'); | |
foreach ($email[0] as $emailtext) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## TODO: | |
# Figure out how to get nginx file-aio module working (incompatible?) | |
## Get and install tools and dependencies | |
sudo apt-get -y install build-essential zlib1g-dev libpcre3 libpcre3-dev libbz2-dev | |
## Get installed OpenSSL version | |
# Use `whereis openssl` to check if installed first |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HOSTNAME="My Little Rust Server" | |
IDENTITY="" | |
POST=28015 | |
PLAYERS=100 | |
SERVER_ARGS | |
## Install dependencies | |
sudo add-apt-repository -y ppa:ubuntu-wine/ppa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git clone https://github.com/ircanywhere/ircanywhere.git | |
git checkout development | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs | |
sudo curl https://raw.github.com/creationix/nvm/v0.3.0/install.sh | sh |