Blog et Aide mémoire informatique

jeudi 17 mai 2018

Convert SVN to Git

- Get repositotry Commiters
svn log -q https://yourRepoUrl | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt
- Checkout / Convert To Git
git svn --authors-file=authors-transform.txt clone https://yourRepoUrl   --trunk=trunk --branches=branches --tags=tags
- List all branch
git branch -a
- Checkout the Branch Localy
git checkout remotes/origin/v2
git checkout master
-Create Local Branch From Remote Branch
git branch v2 remotes/origin/v2
-Push Publish on Github
git remote add origin https://user@gitRepos/theGitProject.git
git push -u origin master
git push --all
git push --tags

mardi 19 décembre 2017

Nice link with time function

https://wiki.archlinux.org/index.php/time

mercredi 13 septembre 2017

Remove from boot Linux

update-rc.d -f mongodb remove

mardi 2 mai 2017

Add Address to IPTABLE DROP

Block a region. Usefull for China.
iptables -A INPUT -s 202.109.0.0/16 -j DROP

Add Address to IPTABLE DROP

Block a region. Usefull for China.
iptables -A INPUT -s 202.109.0.0/16 -j DROP

samedi 6 février 2016

Inodes

List inodes of mounted device
df -i
List inodes for directory
ls -id
find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n

mercredi 2 décembre 2015

Hardware monitoring

Install this tool ipmitool few command Print system event log
ipmitool sel list
ipmitool 

lundi 23 novembre 2015

Logrotate

Some tips on logrotate

Lire la suite

mercredi 27 mai 2015

Network Config + Proxy : Fast Facts

Some quick reminder of file to modify

Lire la suite

mercredi 14 janvier 2015

Mail : interesting short cut

list mail queue
mailq  | tail -1 | awk '{print $5}'
See detail of queue
qshape
Flush mail queue
postfix -f
Flush defered mail queue
postsuper -d ALL deferred

dimanche 11 mai 2014

BBox DNS

Copy/Paste of this URL, in case of this page will be removed. Link

Lire la suite

mercredi 19 février 2014

Open Port Process : reminder

sudo lsof -i
sudo netstat -lptu
sudo netstat -tulpn

jeudi 19 juillet 2012

Discover Ubuntu version on your server

Short command line to check your Ubuntu version

Lire la suite

lundi 22 août 2011

Remove file older than *

This small command allow you to remove files based on time.

Lire la suite

samedi 5 décembre 2009

SFTP CHROOTING

This is a small tutorial to configure and securise an SFTP server based on OpenSSH

Lire la suite