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
var aRebobinar:Boolean = false; | |
botaoesquerda.addEventListener(MouseEvent.CLICK, animar); | |
botaodireita.addEventListener(MouseEvent.CLICK, retroceder); | |
mcinvi.addEventListener(MouseEvent.ROLL_OVER, parar); | |
mcinvi.addEventListener(MouseEvent.ROLL_OUT, tocar); | |
mcinvi.buttonMode = true; | |
function parar(event:MouseEvent) |
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<canvas id="canvas"></canvas> | |
<!-- Paper.js v0.9.15 Date: Sun Dec 1 23:54:52 2013 +0100 --> | |
<script type="text/javascript" src="https://rawgithub.com/paperjs/paper.js/master/dist/paper-full.min.js"></script> | |
<script type="text/javascript"> | |
window.onload = function() { | |
var canvas = document.getElementById('canvas'); | |
paper.setup(canvas); |
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
su - postgres | |
pg_dump -f /tmp/dump_name.sql -U postgres current_database_name | |
psql -f /tmp/dump_name.sql new_database_name |
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
[nginx] | |
name=nginx repo | |
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ | |
gpgcheck=0 | |
enabled=1 |
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
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 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 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 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 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 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 |
OlderNewer