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
| while read oldrev newrev ref | |
| do | |
| branch=`echo $ref | cut -d/ -f3` | |
| if [ "production" == "$branch" -o "master" == "$branch" ]; then | |
| git --work-tree=/var/www/tracker/production/ checkout -f $branch | |
| cd /var/www/tracker/production/ | |
| # Install any packages, if needed | |
| npm install | |
| # Restart the application. Note: the application uid should be 'app' |
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
| http://www.lbc.co.uk/ | |
| both - beuth | |
| talking - toukin | |
| naughty - nouty | |
| no - neu | |
| so - seu | |
| you - yeu | |
| cant - cânt | |
| daughter - douter |
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
| # Sets the timezone to Europe/Lisbon | |
| sudo mv /etc/localtime /etc/localtime.bak | |
| sudo ln -s /usr/share/zoneinfo/Europe/Lisbon /etc/localtime |
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
| # TODO: Use variables for the versions | |
| # TODO: Accept command-line arguments and install everything | |
| # Install Ruby | |
| cd /tmp | |
| wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | |
| tar xvzf ruby-2.1.2.tar.gz | |
| cd ruby-2.1.2 | |
| ./configure --prefix=/usr |
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
| # Create an alias for the command (an abbreviation) | |
| alias cls='echo -en "\ec"' | |
| # Usage: | |
| cls |
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
| # -u <username> : defines with what user id arpwatch should run | |
| # -e <email> : the <email> where to send the reports | |
| # -s <from> : the <from>-address | |
| # -i <interface> : override the default network interface | |
| OPTIONS="-u arpwatch -e wsilva -s 'root (Arpwatch)' -i wlp3s0" |
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 | |
| # Set the router IP and MAC addresses before running the script | |
| ROUTER_IP_ADDRESS=192.168.0.1 | |
| ROUTER_MAC_ADDRESS=10:FE:ED:4F:FD:3A | |
| arptables -P INPUT DROP | |
| arptables -P OUTPUT DROP | |
| # Only accept arp requests from my router. |
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
| On the remote server: | |
| mkdir -p /home/username/repositories/my-repo.git | |
| cd /home/wsilva/repositories/my-repo.git | |
| git init --bare | |
| On my machine: | |
| git remote add git remote add origin username@hostname:/home/wsilva/repositories/my-repo.git | |
| git push origin master |
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
| [nginx] | |
| name=nginx repo | |
| baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ | |
| gpgcheck=0 | |
| enabled=1 |
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
| su - postgres | |
| pg_dump -f /tmp/dump_name.sql -U postgres current_database_name | |
| psql -f /tmp/dump_name.sql new_database_name |