This file contains 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
description "Upstart task: execute this script on shutdown or reboot" | |
task | |
# this will execute this script before the upstart send the KILL signals | |
start on starting rc RUNLEVEL=[06] | |
exec mktemp --tmpdir=/home/ubuntu test.XXXXXX |
This file contains 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 | |
# Usage ./pdfsplitr.sh inputfile.pdf outputfile.pdf pagenumber | |
# Example: ./pdfsplitr.sh myfile.pdf myotherfile.pdf 2 | |
# http://viktorpetersson.com/2010/10/22/how-to-split-a-pdf-files-on-mac-and-linuxunix/ | |
GS=$(which gs) | |
# Make sure Ghostscript is installed | |
if [[ $GS = "" ]] | |
then |
This file contains 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
# Activate RVM | |
function rvm_activate { | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" | |
} | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { |
This file contains 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 | |
# | |
# This is the same file as /usr/bin/ssh-copy-id on Ubuntu 10.04.2 | |
# | |
# Shell script to install your public key on a remote machine | |
# Takes the remote machine name as an argument. | |
# Obviously, the remote machine must accept password authentication, | |
# or one of the other keys in your ssh-agent, for this to work. | |
ID_FILE="${HOME}/.ssh/id_rsa.pub" |
This file contains 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
/* Decoder for password encoding of Cisco VPN client. | |
Copyright (C) 2005 Maurice Massar | |
Thanks to [email protected] for decoding and posting the algorithm! | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 2 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, |
This file contains 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 | |
PYTHON_URL=http://python.org/ftp/python/2.7.1/Python-2.7.1.tar.bz2 | |
SETUPTOOLS_URL=http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg#md5=fe1f997bc722265116870bc7919059ea | |
INSTALL_PREFIX=/home/rcmachado/python | |
# Abort scripts if some of the comands returns != 0 | |
set -o errexit | |
# Abort if a variable that isn't defined is used | |
set -o nounset |
This file contains 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
from pyccuracy.actions import ActionBase | |
class SendSMSAction(ActionBase): | |
regex = r'^(And )?I send a SMS to [\"](?P<short_number>\d+)[\"] with [\"](?P<message>.+)[\"] as [\"](?P<msisdn>\d+)[\"]$' | |
def execute(self, context, short_number, message, msisdn): | |
url = "http://myserver/dispatcher.php?MESSAGE=" + message + "&SENDERID=" + msisdn + "&PHONEID=" + short_number | |
self.execute_action(u"I go to \"{0}\"".format(url), context) |
This file contains 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
defutf8 on | |
msgwait 3 | |
#sorendition 05 43 | |
sorendition 00 02 | |
hardstatus alwayslastline "%c | %Y-%m-%d | %w" | |
# barra verde e preto, com códigos de cores literais | |
#hardstatus alwayslastline "\033[m\033[42;30m%c\033[m \033[42;30m%Y%m%d\033[m \033[42;30m %w \033[m" |
This file contains 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 | |
# | |
# Installs PHPUnit on a very old CentOS 5.3 | |
# | |
pear upgrade --force http://pear.php.net/get/PEAR-1.8.1 | |
pear channel-discover pear.phpunit.de | |
pear channel-discover pear.symfony-project.com | |
pear install phpunit/PHPUnit |