relatório de atividades relacionadas à minha pesquisa em métodos de modelagem computacional.
quarta-feira, 17 de setembro de 2008
GmailFS
http://richard.jones.name/google-hacks/gmail-filesystem/gmail-filesystem-using.html
quinta-feira, 11 de setembro de 2008
quarta-feira, 10 de setembro de 2008
reverse ssh tunnel
#!/bin/sh
# $REMOTE_HOST is the name of the remote system
REMOTE_HOST=firewall
# $REMOTE_PORT is the remote port number that will be used to tunnel
# back to this system
REMOTE_PORT=22222
# $COMMAND is the command used to create the reverse ssh tunnel
COMMAND="ssh -q -N -R $REMOTE_PORT:localhost:22 $REMOTE_HOST"
# Is the tunnel up? Perform two tests:
# 1. Check for relevant process ($COMMAND)
pgrep -f -x "$COMMAND" > /dev/null 2>&1 || $COMMAND
# 2. Test tunnel by looking at "netstat" output on $REMOTE_HOST
ssh $REMOTE_HOST netstat -an | egrep "tcp.*:$REMOTE_PORT.*LISTEN" >
/dev/null 2>&1
if [ $? -ne 0 ] ; then
pkill -f -x "$COMMAND"
$COMMAND
fi
~$ crontab -e
# m h dom mon dow command
*/17 * * * * ~/bin/ssh-r.sh
nfs
sudo apt-get install portmap nfs-kernel-server
sudo gedit /etc/exports
/home 192.168.0.0/255.255.255.0(rw,sync,no_subtree_check)
/usr/local 192.168.0.0/255.255.255.0(rw,sync,no_subtree_check)
The above shares /home and /usr/local to all clients in the private
network falling within the designated ip address range.
After setting up /etc/exports, export the shares:
sudo exportfs -ra
You'll want to do this command whenever /etc/exports is modified.
Restart Services
If /etc/default/portmap was changed, portmap will need to be restarted:
sudo /etc/init.d/portmap restart
The NFS kernel server will also require a restart:
sudo /etc/init.d/nfs-kernel-server restart
client
sudo apt-get install portmap nfs-common
sudo mount 192.168.1.42:/home/music /home/poningru/music
rsync
ssh -CNq firewall -L 2222:alvo:22 > /dev/null 2>&1 &
-C Requests compression
-N Do not execute a remote command.
-q Quiet mode.
rsync -azc -e 'ssh -p 2222' origem localhost:
rsync
rsync -azc origem destino:
-c, --checksum skip based on checksum, not mod-time & size
-a, --archive archive mode; same as -rlptgoD (no -H, -A)
-z, --compress compress file data during the transfer
povray metal
#include "golds.inc"
sphere { <0, 0, -5> , 1 texture {T_Brass_1B} }
T_Brass_1A to T_Brass_5E
T_Copper_1A to T_Copper_5E
T_Chrome_1A to T_Chrome_5E
T_Silver_1A to T_Silver_5E
A = sem refrexo
bc - An arbitrary precision calculator language
c() cos (rad)
s() sin (rad)
bash scripts
for i in `seq 8 405`
do
head -n $i entrada.pov > saida$i.pov
done
for i in `cat listaesf` ; do echo $i ; done
sed 's/relatime/noatime/' </etc/fstab >fstab.tmp