WaYdotNET - RT : Non si può nemmeno chiamarli animali: solo gli esseri umani possono commettere certe bestialità.
formats/

tips: search text into list file and order by date

Published on January 13, 2011 by WaYdotNET in Script

Simple but power command to search text inside file ed order list file by date ….. thx to google and all user

1
grep -rl 'REGEX' * | xargs ls -trl
 
Tags: , ,
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
formats/

Windows ANSI Color (WAC)

wac.exe is a small command line utility that lets you use ANSI colors on Windows.

link
https://github.com/aslakhellesoy/wac

 
Tags: ,
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
formats/

emacs in terminal mode

Published on October 22, 2010 by WaYdotNET in Script, tips

how to start emacs in terminal-mode instead of graphical mode ?
the solutions is :

1
emacs -nw
 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
formats/

winetricks Gentoo 64-bit WINEPREFIX

Published on October 14, 2010 by WaYdotNET in Script, tips

if you have this message

you’are using a 64-bit WINEPREFIX, most of winetricks hasn’t been fixed for win64 yet.

1
2
3
rm $HOME/.wine -rf
export WINEARCH=win32
export WINEPREFIX=$HOME/.wine/

now, you use wine 32 bit into gentoo (or other distro) 64 bit :D

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
formats/

mini backup with rsync

Published on July 1, 2010 by WaYdotNET in Script, tips
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# Backup file remote/local
# By Carlo Bertini [WaYdotNET]
# il tutto utilizzando rsync senza scomodare subversion
 
# RSYNC OPTION 
# -r => ricorsivo
# -l => copy symlinks as symlinks
# -p => preserve permissions
# -v => verbose
# -u => update, ignorare i file che sono più nuovi nella destinazione
# -a => archive mode
# -z => comprime i file durante l invio
# -h => rendere leggibile l output
# --delete => cancello i file estranei nella destinazione
 
# il comando si deve chiamare con:
demo="sync_to_waydotnet [up or down] local_folder remote_folder" 
 
# VARIABILI
base="~/backup"
type=$1
local_folder=$2
remote_folder=$base/$3
host="HOST.EXT"
user="user"
 
if [ $type = "up" ] ; then
	echo "UPLOAD $local ==> $remote"	
	rsync -lrpuazhv --delete -e ssh $local_folder $user@$host:$remote_folder
elif [ $type = "down" ] ; then
	echo "DOWNLOAD ...... $remote ==> $local"
	rsync -lrpuazhv --delete -e ssh  $user@$host:$remote_folder $local_folder
else
	echo -e "la forma corretta da scrivere e' \n $demo'"
fi
echo "Have a nice day :P"
 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn