Monitor a log file and execute commands based on patterns
#!/bin/sh tail -fn0 /var/log/file.log | while read line ; do echo “$line” | grep “pattern” if [… Read More »Monitor a log file and execute commands based on patterns
#!/bin/sh tail -fn0 /var/log/file.log | while read line ; do echo “$line” | grep “pattern” if [… Read More »Monitor a log file and execute commands based on patterns
Note Pensez a fixer les deux paramètres pathRepo et pathBackup. Merci de me laisser un commentaire si vous en sentez le besoin. #!/bin/bash # Script… Read More »Sauvegarde d’un dépôt SVN
gpresult /r gpedit.msc rsop.msc
<SCRIPT LANGUAGE=“JavaScript”> <!– Begin function getCSS() { datetoday = new Date(); timenow=datetoday.getTime(); datetoday.setTime(timenow); thehour = datetoday.getHours(); if (thehour > 20) display = “tree_twilight.css”; else if… Read More »Switch CSS according to the hours of the day
<?php $useragent = $_SERVER[‘HTTP_USER_AGENT’]; if( eregi(“(msie) ([6]{1})”,$useragent) ) {print “IE 8.0 -> do something”;} else { } ?>
SELECT * FROM `table` WHERE BINARY `COLUMN` = ‘value’ Note binary
# Ajouter une route par defaut route add default gw 192.168.0.1 # Afficher les routes route -n # Supprimer une route route del -net 192.168.0.1/24
Note Creates a grey overlay in background and a modal window in foreground <!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”> <html> … Read More »Create a Lightbox effect only with CSS – no javascript needed (modal window)
/** *@desc browse an array and esapce all of his filed *@return array escaped array */ function array_escape(tab) { … Read More »[JS] array_escape () escape an array
a2ensite mysite # ‘mysite’ refers to /etc/apache2/sites-available/mysite # This creates the symbolic link between configuration files in /etc/apache2/sites-available and /etc/apache2/sites-enabled a2dissite mysite # disable the… Read More »Enable/Disable an apache2 site on Debian