commit
					12f0d2ae82
				
				 39 changed files with 1115 additions and 0 deletions
			
			
		| @ -0,0 +1,5 @@ | |||||||
|  | # Ignore the renderd site | ||||||
|  | /site/ | ||||||
|  | 
 | ||||||
|  | # Ignore the photo's | ||||||
|  | /photo/*/*.jpg | ||||||
| @ -0,0 +1,10 @@ | |||||||
|  | 
 | ||||||
|  | ----------------------------------------------------------------------------------- | ||||||
|  |                                  © R.P. Neeleman | ||||||
|  | ----------------------------------------------------------------------------------- | ||||||
|  | 
 | ||||||
|  |       </pre> | ||||||
|  |     </td></tr></table> | ||||||
|  |   </body> | ||||||
|  | 
 | ||||||
|  | </html> | ||||||
| @ -0,0 +1,10 @@ | |||||||
|  | <html> | ||||||
|  |   <head> | ||||||
|  |     <title>Sciuro.org</title> | ||||||
|  |   </head> | ||||||
|  | 
 | ||||||
|  |   <body bgcolor='0066FF' text='white' link='white' vlink='white'> | ||||||
|  |     <table><tr><td width=82> | ||||||
|  |       <pre> | ||||||
|  |   <a href='__SITEURL__/index.html'>Home</a>  |  <a href='__SITEURL__/blog/index.html'>Blog</a>  |  <a href='__SITEURL__/photo/index.html'>Photo's</a>  |  <a href='__SITEURL__/howto/index.html'>Howto</a>  |  <a href='__SITEURL__/servers/index.html'>Servers</a>  |  <a href='__SITEURL__/links.html'>Links</a>  |  <a href='__SITEURL__/about.html'>About</a>  |  <a href='__SITEURL__/contact.html'>Contact</a> | ||||||
|  | ----------------------------------------------------------------------------------- | ||||||
| @ -0,0 +1,2 @@ | |||||||
|  |                              \ <a href='__SITEURL__/servers/index.html'>Layout</a>  |  <a href='__SITEURL__/servers/status.html'>Status</a>   |  <a href='__SITEURL__/servers/graph.html'>Graphs</a> / | ||||||
|  |                               +-----------------------------+ | ||||||
| @ -0,0 +1,24 @@ | |||||||
|  | <b>About</b> | ||||||
|  | <img src='__SITEURL__/images/foto_me.jpg' align='right'> | ||||||
|  | My name is Rogier, or Roger as most non-dutch speakers | ||||||
|  | will prefer. I am a 33 year old computer engineer, | ||||||
|  | living in The Netherlands. | ||||||
|  | 
 | ||||||
|  | Besides being a computer nerd, I spend my time with | ||||||
|  | Scouting, Geocaching, hiking and biking. And sometimes | ||||||
|  | climbing and skiing. | ||||||
|  | 
 | ||||||
|  | <b>The name Sciuro</b> | ||||||
|  | The name Sciuro is a nickname I got from some Swiss | ||||||
|  | scouts. In Switserland it's common to give every scout | ||||||
|  | a nickname and they came up with the nickname Sciuro. | ||||||
|  | It's pronounced as t.si.uro and meaning 'squirrel' in | ||||||
|  | Esperanto. If you don't know what esperanto is, <a href='http://s.sciuro.org/zcm6w' target='new'>here</a> | ||||||
|  | is an explaination. | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| @ -0,0 +1,6 @@ | |||||||
|  | <b>Geek and Poke</b> | ||||||
|  | 
 | ||||||
|  | I found a new cartoon. It's a couple of years old, but is a very good one! | ||||||
|  | Especially for computer geeks. Made by Oliver Widder, an IT-guy from Hamburg, | ||||||
|  | Germany. Look for his cartoons on <a href='http://geek-and-poke.com/' target=new>http://geek-and-poke.com/</a>. | ||||||
|  | 
 | ||||||
| @ -0,0 +1,56 @@ | |||||||
|  | <b>Can't assign requested address</b> | ||||||
|  | 
 | ||||||
|  | Using Mac OS X 10.9 (Mavericks) I noticed that my browser wasn't working. Except | ||||||
|  | some sites like google. Almost nothing works anymore. Except IPV6 connections. | ||||||
|  | There was no problem with that. Also incomming connections on IPV4 like SSH or | ||||||
|  | VNC works. | ||||||
|  | 
 | ||||||
|  | So I tried to connect from the terminal: | ||||||
|  | 
 | ||||||
|  |   imac:~ rogier$ telnet www.nu.nl 80 | ||||||
|  |   Trying 62.69.174.78... | ||||||
|  |   telnet: connect to address 62.69.174.78: Can't assign requested address | ||||||
|  |   Trying 62.69.166.18... | ||||||
|  |   telnet: connect to address 62.69.166.18: Can't assign requested address | ||||||
|  |   Trying 62.69.166.15... | ||||||
|  |   telnet: connect to address 62.69.166.15: Can't assign requested address | ||||||
|  |   Trying 62.69.174.75... | ||||||
|  |   telnet: connect to address 62.69.174.75: Can't assign requested address | ||||||
|  |   telnet: Unable to connect to remote host | ||||||
|  | 
 | ||||||
|  | No connection possible. So what went wrong? | ||||||
|  | 
 | ||||||
|  | The netstat -a gives me really a lot of "CLOSED" connections. That could not be a | ||||||
|  | good sign. After some digging on the internet I came to an article on the Apple | ||||||
|  | discussion list about this problem. It turns out that there is (probably) a bug | ||||||
|  | in Mavericks. It gives you a lot of LAST_ACK connections. You can check your | ||||||
|  | connection state with the following command: | ||||||
|  | 
 | ||||||
|  |   netstat -n | egrep '^(tcp|udp)' | awk '{print $NF}' | psort | ||||||
|  | 
 | ||||||
|  | If you do the same for IPV6, you get a whole different situation: | ||||||
|  | 
 | ||||||
|  |   netstat -l | ||||||
|  | 
 | ||||||
|  | It turns out that after 20 to 25 days, something went very very wrong inside your | ||||||
|  | mac. The only thing that will help is rebooting the whole system. Looking at my | ||||||
|  | own system, I rebooted 24 day's ago. | ||||||
|  | 
 | ||||||
|  |   imac:~ rogier$ last reboot | ||||||
|  |   reboot ~ Sun Jan 12 11:15 | ||||||
|  |   reboot ~ Thu Dec 19 10:53 | ||||||
|  |   reboot ~ Wed Dec 11 08:31 | ||||||
|  |   reboot ~ Sat Dec 7 09:56 | ||||||
|  |   reboot ~ Fri Dec 6 07:24 | ||||||
|  |   reboot ~ Thu Dec 5 14:31 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | Anyone a solution? | ||||||
|  | 
 | ||||||
|  | Update: A temporary solution could be: Thanks <a href='http://nslog.com/2013/12/14/lost_internet_connection' target=new>Erik J. Barzeski</a> | ||||||
|  | 
 | ||||||
|  |   sudo ifconfig en0 down | ||||||
|  |   sudo route flush | ||||||
|  |   sudo ifconfig en0 up | ||||||
|  | 
 | ||||||
|  | More information: <a href='https://discussions.apple.com/thread/5551686' target=new>https://discussions.apple.com/thread/5551686</a> | ||||||
| @ -0,0 +1,33 @@ | |||||||
|  | <b>Plotting users on facebook</b> | ||||||
|  | 
 | ||||||
|  | I was playing with Munin, the "network resource monitoring tool". But you can also | ||||||
|  | plot other things than CPU usage or network traffic. As long as you can capture it | ||||||
|  | in a value. | ||||||
|  | 
 | ||||||
|  | My default chat application is not facebook, but IRC. To chat with facebook users, | ||||||
|  | I use a ZNC bouncer together with Bitlbee. | ||||||
|  | 
 | ||||||
|  |    +---------+    +---------+    +---------+    +---------+ | ||||||
|  |    |         |    |         |    |         |    |         | | ||||||
|  |    | Client  |--->| ZNC     |--->| Bitlbee |--->| Facebook| | ||||||
|  |    | (me)    |    | (log)   |    |         |    |         | | ||||||
|  |    +---------+    +---------+    +---------+    +---------+ | ||||||
|  | 
 | ||||||
|  | The ZNC bouncer is logging the users coming and going to the channel when they | ||||||
|  | use facebook. I used the Munin plugin "loggrep_" with the next config on that | ||||||
|  | logfile: | ||||||
|  | 
 | ||||||
|  |   [loggrep_facebook] | ||||||
|  |     user rogier | ||||||
|  |     env.regex localhost sets mode | ||||||
|  |     env.label Facebook users | ||||||
|  |     env.logfile /home/rogier/.znc/users/rogier/moddata/log/facebook.log | ||||||
|  |     env.title User count on facebook | ||||||
|  | 
 | ||||||
|  | So I filter the logfile for the text "localhost sets mode" because when a user | ||||||
|  | came online, he get's a +v from bitlbee. After a while, you will get the next | ||||||
|  | graph. | ||||||
|  | 
 | ||||||
|  | <center> | ||||||
|  | <img src='http://noc.sciuro.org/munin/sciuro.org/irc.sciuro.org/loggrep_facebook-week.png'> | ||||||
|  | </center> | ||||||
| @ -0,0 +1,20 @@ | |||||||
|  | <b>A new text based website</b> | ||||||
|  | 
 | ||||||
|  | Yes, a new text based website! After some time without a website, with a website | ||||||
|  | based on a CMS, and with some 'almost finished' websites, I feel the need to make | ||||||
|  | a website with the following criteria: | ||||||
|  | 
 | ||||||
|  | -Fast | ||||||
|  | -Simple | ||||||
|  | -Logica during generating | ||||||
|  | 
 | ||||||
|  | I found jekyll, but it took me to much time to learn and I ran into some simple | ||||||
|  | problems. So I made my own CMS like environment. At this moment written in Bash. | ||||||
|  | Maybe in the future (Ugh) I will rewrite it in Python, but till then I got a | ||||||
|  | working solution. | ||||||
|  | 
 | ||||||
|  | It relies on a script, a directory structure and some text files. Nothing more. | ||||||
|  | The script is looking through the directories for text files and reorder,  | ||||||
|  | combine and replace the files for the website itself. | ||||||
|  | 
 | ||||||
|  | I hope this one will work a little bit longer. :-) | ||||||
| @ -0,0 +1,10 @@ | |||||||
|  | <b>Contact</b> | ||||||
|  | 
 | ||||||
|  | You can reach me as follows: | ||||||
|  | 
 | ||||||
|  | <b>E-Mail:</b>  <a href='mailto:info@sciuro.org'>info@sciuro.org</a> | ||||||
|  | <b>IRC:</b>     Sciuro on FreeNode, IRCNet, EFNet and Scoutlink | ||||||
|  | <b>Twitter:</b> <a href='http://www.twitter.com/sciuro_nl' target=new>Sciuro_NL</a> | ||||||
|  | <b>ICQ:</b>     17135284 | ||||||
|  | 
 | ||||||
|  | <b>GPG</b>:     You can find my pgp/gpg key <a href='__SITEURL__/files/pgp.txt'>here</a> | ||||||
| @ -0,0 +1,90 @@ | |||||||
|  | -----BEGIN PGP PUBLIC KEY BLOCK----- | ||||||
|  | Version: GnuPG/MacGPG2 v2.0.22 (Darwin) | ||||||
|  | Comment: GPGTools - https://gpgtools.org | ||||||
|  | 
 | ||||||
|  | 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 | ||||||
|  | =OyHW | ||||||
|  | -----END PGP PUBLIC KEY BLOCK----- | ||||||
|  | 
 | ||||||
| @ -0,0 +1,209 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | # Variables | ||||||
|  | SITEURL="/newsite" | ||||||
|  | LAYOUT=_layout | ||||||
|  | SITE=site | ||||||
|  | EXTRA='images scripts files' | ||||||
|  | SERVERS='314.sciuro.org chip.sciuro.org skippy.sciuro.org slappy.sciuro.org irc.sciuro.org lists.laurentiusgroep.nl' | ||||||
|  | 
 | ||||||
|  | # Prereq | ||||||
|  | mkdir -p $SITE | ||||||
|  | 
 | ||||||
|  | # Root pagina's | ||||||
|  | rm -rf $SITE/*.html | ||||||
|  | for i in `ls *.txt`; do | ||||||
|  |   FILENAME=`echo $i |cut -d\. -f1` | ||||||
|  |   cat $LAYOUT/header.html >> $SITE/$FILENAME.html | ||||||
|  |   cat $i >> $SITE/$FILENAME.html | ||||||
|  |   cat $LAYOUT/footer.html >> $SITE/$FILENAME.html | ||||||
|  | done | ||||||
|  | 
 | ||||||
|  | # Server directory | ||||||
|  | mkdir -p $SITE/servers/ | ||||||
|  | rm -rf $SITE/servers/*.html | ||||||
|  | 
 | ||||||
|  | for i in `ls servers/*.txt`; do | ||||||
|  |   FILENAME=`echo $i |cut -d\. -f1` | ||||||
|  |   cat $LAYOUT/header.html >> $SITE/$FILENAME.html | ||||||
|  |   cat $LAYOUT/servers.html >> $SITE/$FILENAME.html | ||||||
|  |   cat $i >> $SITE/$FILENAME.html | ||||||
|  |   cat $LAYOUT/footer.html >> $SITE/$FILENAME.html | ||||||
|  | done | ||||||
|  | 
 | ||||||
|  | for i in $SERVERS; do | ||||||
|  |   HNAME=`echo $i | cut -d\. -f1` | ||||||
|  |   DNAME=`echo $i | cut -d\. -f2,3 --output-delimiter=\.` | ||||||
|  |   FILENAME=servers/graph-$HNAME | ||||||
|  |   cat $LAYOUT/header.html >> $SITE/$FILENAME.html | ||||||
|  |   cat $LAYOUT/servers.html >> $SITE/$FILENAME.html | ||||||
|  |   cat servers/graph.txt >> $SITE/$FILENAME.html | ||||||
|  |   echo "" >> $SITE/$FILENAME.html | ||||||
|  |   echo "<center>" >> $SITE/$FILENAME.html | ||||||
|  |   echo "<img src='http://noc.sciuro.org/munin/$DNAME/$i/cpu-day.png'>" >> $SITE/$FILENAME.html | ||||||
|  |   echo "<img src='http://noc.sciuro.org/munin/$DNAME/$i/memory-day.png'>" >> $SITE/$FILENAME.html | ||||||
|  |   echo "<img src='http://noc.sciuro.org/munin/$DNAME/$i/if_eth0-day.png'>" >> $SITE/$FILENAME.html | ||||||
|  |   echo "</center>" >> $SITE/$FILENAME.html | ||||||
|  |   cat $LAYOUT/footer.html >> $SITE/$FILENAME.html | ||||||
|  | done | ||||||
|  | 
 | ||||||
|  | # Howto directory | ||||||
|  | mkdir -p $SITE/howto/ | ||||||
|  | rm -rf $SITE/howto/*.html | ||||||
|  | 
 | ||||||
|  | cat $LAYOUT/header.html >> $SITE/howto/index.html | ||||||
|  | echo "<b>Howto's</b>" >> $SITE/howto/index.html | ||||||
|  | echo "" >> $SITE/howto/index.html | ||||||
|  | echo "Some howto's I wrote. If something is wrong, or you need help, please send me" >> $SITE/howto/index.html | ||||||
|  | echo "a message." >> $SITE/howto/index.html | ||||||
|  | echo "" >> $SITE/howto/index.html | ||||||
|  | for i in `ls howto/*.txt`; do | ||||||
|  |   FILENAME=`echo $i |cut -d\. -f1` | ||||||
|  |   HTT=`echo $FILENAME |cut -d\/ -f2` | ||||||
|  |   echo "-<a href='__SITEURL__/$FILENAME.html'>$HTT</a>" >> $SITE/howto/index.html | ||||||
|  | done | ||||||
|  | cat $LAYOUT/footer.html >> $SITE/howto/index.html | ||||||
|  | 
 | ||||||
|  | for i in `ls howto/*.txt`; do | ||||||
|  |   FILENAME=`echo $i |cut -d\. -f1` | ||||||
|  |   cat $LAYOUT/header.html >> $SITE/$FILENAME.html | ||||||
|  |   cat $i >> $SITE/$FILENAME.html | ||||||
|  |   MODTIME=`date -r $i +%A\ %B%e\ %Y,\ %R` | ||||||
|  |   echo "" >> $SITE/$FILENAME.html | ||||||
|  |   echo "<a href='mailto:react@sciuro.org?SUBJECT=$FILENAME'>React to Howto</a>" >> $SITE/$FILENAME.html | ||||||
|  |   echo "Last modification: $MODTIME" >> $SITE/$FILENAME.html | ||||||
|  |   cat $LAYOUT/footer.html >> $SITE/$FILENAME.html | ||||||
|  | done | ||||||
|  | 
 | ||||||
|  | # Blog pages | ||||||
|  | mkdir -p $SITE/blog/ | ||||||
|  | rm -rf $SITE/blog/*.html | ||||||
|  | 
 | ||||||
|  | cat $LAYOUT/header.html >> $SITE/blog/index.html | ||||||
|  | echo "<b>Blog</b>" >> $SITE/blog/index.html | ||||||
|  | for i in `ls -r blog/*.txt`; do | ||||||
|  |   FILENAME=`echo $i |cut -d\. -f1` | ||||||
|  |   BTITLE=`echo $FILENAME |cut -d\/ -f2 |cut -b12-` | ||||||
|  |   BFILEDATE=`echo $FILENAME |cut -d\/ -f2 |cut -b-10` | ||||||
|  |   CURMONTH=`date -d$BFILEDATE +%B\ %Y` | ||||||
|  |   if [ "$CURMONTH" != "$LASTMONTH" ]; then | ||||||
|  |     LASTMONTH=$CURMONTH | ||||||
|  |     echo "" >> $SITE/blog/index.html | ||||||
|  |     echo "$CURMONTH" >> $SITE/blog/index.html | ||||||
|  |   fi | ||||||
|  |   echo "-<a href='__SITEURL__/$FILENAME.html'>$BTITLE</a>" >> $SITE/blog/index.html | ||||||
|  | done | ||||||
|  | cat $LAYOUT/footer.html >> $SITE/blog/index.html | ||||||
|  | 
 | ||||||
|  | for i in `ls blog/*.txt`; do | ||||||
|  |   FILENAME=`echo $i |cut -d\. -f1` | ||||||
|  |   cat $LAYOUT/header.html >> $SITE/$FILENAME.html | ||||||
|  |   BFILEDATE=`echo $FILENAME |cut -d\/ -f2 |cut -b-10` | ||||||
|  |   BDATE=`date -d$BFILEDATE +%A\ %B\ %e\ %Y` | ||||||
|  |   echo $BDATE >> $SITE/$FILENAME.html | ||||||
|  |   echo "" >> $SITE/$FILENAME.html | ||||||
|  |   cat $i >> $SITE/$FILENAME.html | ||||||
|  |   BLOGID=`echo $FILENAME |cut -d\/ -f2` | ||||||
|  |   echo "" >> $SITE/$FILENAME.html | ||||||
|  |   echo "<a href='mailto:react@sciuro.org?SUBJECT=$BLOGID'>React to blog</a>" >> $SITE/$FILENAME.html | ||||||
|  |   cat $LAYOUT/footer.html >> $SITE/$FILENAME.html | ||||||
|  | done | ||||||
|  | 
 | ||||||
|  | # Photo pages | ||||||
|  | mkdir -p $SITE/photo/ | ||||||
|  | rm -rf $SITE/photo/*.html | ||||||
|  | 
 | ||||||
|  | cat $LAYOUT/header.html >> $SITE/photo/index.html | ||||||
|  | echo "<b>Photo's</b>" >> $SITE/photo/index.html | ||||||
|  | for i in `ls -r photo/*.txt`; do | ||||||
|  |   FILENAME=`echo $i |cut -d\. -f1` | ||||||
|  |   PTITLE=`echo $FILENAME |cut -d\/ -f2 |cut -b12-` | ||||||
|  |   PFILEDATE=`echo $FILENAME |cut -d\/ -f2 |cut -b-10` | ||||||
|  |   CURMONTH=`date -d$PFILEDATE +%B\ %Y` | ||||||
|  |   if [ "$CURMONTH" != "$LASTMONTH" ]; then | ||||||
|  |     LASTMONTH=$CURMONTH | ||||||
|  |     echo "" >> $SITE/photo/index.html | ||||||
|  |     echo "$CURMONTH" >> $SITE/photo/index.html | ||||||
|  |   fi | ||||||
|  |   echo "-<a href='__SITEURL__/$FILENAME.html'>$PTITLE</a>" >> $SITE/photo/index.html | ||||||
|  | done | ||||||
|  | cat $LAYOUT/footer.html >> $SITE/photo/index.html | ||||||
|  | 
 | ||||||
|  | for i in `ls photo/*.txt`; do | ||||||
|  |   FILENAME=`echo $i |cut -d\. -f1` | ||||||
|  |   BFILEDATE=`echo $FILENAME |cut -d\/ -f2 |cut -b-10` | ||||||
|  |   BDATE=`date -d$BFILEDATE +%A\ %B\ %e\ %Y` | ||||||
|  |   BLOGID=`echo $FILENAME |cut -d\/ -f2` | ||||||
|  |   DIRNAME=`echo $FILENAME |cut -d\/ -f2` | ||||||
|  | 
 | ||||||
|  |   mkdir -p $SITE/$FILENAME/normal/ | ||||||
|  |   mkdir -p $SITE/$FILENAME/thumbs/ | ||||||
|  |   #rm -rf $SITE/$FILENAME/thumbs/*.jpg | ||||||
|  |   rm -rf $SITE/photo/$DIRNAME/*.html | ||||||
|  | 
 | ||||||
|  |   cat $LAYOUT/header.html >> $SITE/$FILENAME.html | ||||||
|  |   cat $i >> $SITE/$FILENAME.html | ||||||
|  |   echo "" >> $SITE/$FILENAME.html | ||||||
|  |   echo $BDATE >> $SITE/$FILENAME.html | ||||||
|  |   echo "" >> $SITE/$FILENAME.html | ||||||
|  | 
 | ||||||
|  |   echo "<center><table border='0'>" >> $SITE/$FILENAME.html | ||||||
|  |   T=0 | ||||||
|  |   rename 'y/A-Z/a-z/' $FILENAME/* | ||||||
|  |   for j in `ls $FILENAME/*.jpg`; do | ||||||
|  |     if [ $T == '0' ]; then | ||||||
|  |       echo "<tr><td>" >> $SITE/$FILENAME.html | ||||||
|  |       T=$((T+1)) | ||||||
|  |     elif [ $T == '5' ]; then | ||||||
|  |       echo "</td></tr><tr><td>" >> $SITE/$FILENAME.html | ||||||
|  |       T=1 | ||||||
|  |     else | ||||||
|  |       echo "</td><td>" >> $SITE/$FILENAME.html | ||||||
|  |       T=$((T+1)) | ||||||
|  |     fi | ||||||
|  | 
 | ||||||
|  |     IMAGENAME=`echo $j |cut -d\/ -f3` | ||||||
|  |     if [ ! -f $SITE/photo/$DIRNAME/thumbs/$IMAGENAME ]; then | ||||||
|  |       convert -resize 120 photo/$DIRNAME/$IMAGENAME $SITE/photo/$DIRNAME/thumbs/$IMAGENAME | ||||||
|  |     fi | ||||||
|  | 
 | ||||||
|  |     if [ ! -f $SITE/photo/$DIRNAME/normal/$IMAGENAME ]; then | ||||||
|  |       convert -resize 480 photo/$DIRNAME/$IMAGENAME $SITE/photo/$DIRNAME/normal/$IMAGENAME | ||||||
|  |     fi | ||||||
|  | 
 | ||||||
|  |     NAME=`echo $IMAGENAME |cut -d\. -f1` | ||||||
|  | 
 | ||||||
|  |     echo "<a href='__SITEURL__/photo/$DIRNAME/$NAME.html'><img src='__SITEURL__/photo/$DIRNAME/thumbs/$IMAGENAME' width=120px></a>" >> $SITE/$FILENAME.html | ||||||
|  | 
 | ||||||
|  |     # Picture page | ||||||
|  | 
 | ||||||
|  |     cat $LAYOUT/header.html >> $SITE/photo/$DIRNAME/$NAME.html | ||||||
|  |     cat $i >> $SITE/photo/$DIRNAME/$NAME.html | ||||||
|  |     echo "" >> $SITE/photo/$DIRNAME/$NAME.html | ||||||
|  |     echo $BDATE >> $SITE/photo/$DIRNAME/$NAME.html | ||||||
|  |     echo "" >> $SITE/photo/$DIRNAME/$NAME.html | ||||||
|  |     echo "<center><a href='__SITEURL__/$FILENAME.html'>index</a></center>" >> $SITE/photo/$DIRNAME/$NAME.html | ||||||
|  |     echo "<center><img src='__SITEURL__/photo/$DIRNAME/normal/$IMAGENAME' width=480px></center>" >> $SITE/photo/$DIRNAME/$NAME.html | ||||||
|  |     cat $LAYOUT/footer.html >> $SITE/photo/$DIRNAME/$NAME.html | ||||||
|  | 
 | ||||||
|  |   done | ||||||
|  | 
 | ||||||
|  |   echo "</table></center>" >> $SITE/$FILENAME.html | ||||||
|  | 
 | ||||||
|  |   cat $LAYOUT/footer.html >> $SITE/$FILENAME.html | ||||||
|  | done | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | # Other directories | ||||||
|  | for i in $EXTRA; do | ||||||
|  |   rm -rf $SITE/$i | ||||||
|  |   cp -a $i $SITE/$i | ||||||
|  | done | ||||||
|  | 
 | ||||||
|  | # Replace variables | ||||||
|  | for i in `find $SITE/ -name *.html`; do | ||||||
|  |   sed -i 's/__SITEURL__/\/newsite/g' $i | ||||||
|  | done | ||||||
|  | 
 | ||||||
|  | # Publish | ||||||
|  | rsync --delete --recursive $SITE/* 314:/usr/share/mini-httpd/html/newsite/ | ||||||
| @ -0,0 +1,24 @@ | |||||||
|  | <b>Always the same error during restarting apache</b> | ||||||
|  | 
 | ||||||
|  | If you restart your Apache webserver, you could get the following error message: | ||||||
|  | 
 | ||||||
|  |   Could not reliably determine the server's fully qualified domain name, | ||||||
|  |   using 127.0.0.1 for ServerName | ||||||
|  | 
 | ||||||
|  | The reason is because your netwerk is not completly setup properly. | ||||||
|  | 
 | ||||||
|  | -Check if your hostname is set in /etc/hostname | ||||||
|  | -Check if your domainname is set in /etc/resolv.conf | ||||||
|  | 
 | ||||||
|  | And the final trick: Put in your /etc/hosts file the next line: | ||||||
|  | 
 | ||||||
|  |   IP-addres fully-quallified-hostname small-hostname | ||||||
|  | 
 | ||||||
|  | Do not swap the fully-quallified-hostname and the small-hostname, because Apache | ||||||
|  | only looks at the first entry and that one should be the fully quallified hostname | ||||||
|  | 
 | ||||||
|  | So for example, for me it will become: | ||||||
|  | 
 | ||||||
|  |   192.168.1.1 scrat.sciuro.org scrat | ||||||
|  | 
 | ||||||
|  | Restart your apache and the message is gone. | ||||||
| @ -0,0 +1,49 @@ | |||||||
|  | <b>Proxy HTTP requests in Apache 2.2 with mod_proxy and mod_balancer</b> | ||||||
|  | 
 | ||||||
|  | You can actually use an Apache web server as a front web server to proxy | ||||||
|  | specified requests to other web servers. For example to load balance your backend | ||||||
|  | servers or to make a failover system in case of an failure. Yes, we are talking | ||||||
|  | about high availability! | ||||||
|  | 
 | ||||||
|  | <b>Simple</b> | ||||||
|  | First enable the modules mod_proxy and mod_proxy_http. Now we can do a simple | ||||||
|  | request forward. Of course we use a Debian system, so to enable the proxy modules | ||||||
|  | we will do: | ||||||
|  | 
 | ||||||
|  |   a2enmod proxy proxy_http | ||||||
|  |   /etc/init.d/apache2 restart | ||||||
|  | 
 | ||||||
|  | Now we can make use of the proxy capabilities of Apache. Put the next part in | ||||||
|  | your virtual host or any other place. | ||||||
|  | 
 | ||||||
|  |   ProxyPass /application http://servername:port/somethingelse/ | ||||||
|  |   ProxyPassReverse /application http://servername:port/somethingelse/ | ||||||
|  | 
 | ||||||
|  | <b>Loadbalance and/or failover</b> | ||||||
|  | For this part we need some more modules. So we enable them. You can also enable | ||||||
|  | the ftp and ajp connectors if you need them. It's exactly the same as with the | ||||||
|  | mod_proxy_http. | ||||||
|  | 
 | ||||||
|  |   a2enmod proxy proxy_http proxy_balancer | ||||||
|  |   /etc/init.d/apache2 restart | ||||||
|  | 
 | ||||||
|  | Now we can have fun! The ProxyPreserveHost is technically not needed. But there | ||||||
|  | are some more options in the proxy module that makes life a little bit easier. | ||||||
|  | We will not proxy requests for /context/static. All the rest will be proxied to | ||||||
|  | the right server. Server1 is active now. Server2 is disabled. (maintenance?) So | ||||||
|  | if Server1 will fail, everybody is moved to a balanced cluster of Server3 and | ||||||
|  | Server4. I know, it's a little bit strange setup, but it's only an example. | ||||||
|  | 
 | ||||||
|  |   ProxyPreserveHost On | ||||||
|  |   ProxyPass /context/static ! | ||||||
|  |   ProxyPass /context balancer://clustername/something | ||||||
|  | 
 | ||||||
|  |   <Proxy balancer://clustername> | ||||||
|  |     BalancerMember http://servername1:port lbset=0 route=server1 | ||||||
|  |     # The next server is temporary disabled. | ||||||
|  |     BalancerMember http://servername2:port lbset=0 route=server2 status=+D | ||||||
|  |     # | ||||||
|  |     # Backupservers if other servers failed | ||||||
|  |     BalancerMember http://servername3:port lbset=1 route=server3 | ||||||
|  |     BalancerMember http://servername4:port lbset=1 route=server4 | ||||||
|  |   </Proxy> | ||||||
| @ -0,0 +1,28 @@ | |||||||
|  | <b>Apache webserver and rewrite rules</b> | ||||||
|  | 
 | ||||||
|  | Here are some rewrite codes I sometimes use. Rewrite is a very powerful Apache | ||||||
|  | module and so almost everything is possible. Some examples. | ||||||
|  | 
 | ||||||
|  | To rewrite your http://www.oldsite.org/something to the new URL | ||||||
|  | http://www.newsite.org/something, you can use the next code: | ||||||
|  | 
 | ||||||
|  |   RewriteCond %{HTTP_HOST} ^www\.oldsite.org [NC] | ||||||
|  |   RewriteRule ^ http://www.newsite.org%{REQUEST_URI} [L,R=301] | ||||||
|  | 
 | ||||||
|  | To do an action when the user don't have a special cookie, for example to force | ||||||
|  | somebody to the login page or redirect him to a welcome page. Take a look at the | ||||||
|  | second rule. This one prevents looping over these rule again and again. | ||||||
|  | 
 | ||||||
|  |   RewriteCond %{HTTP_COOKIE} !logincookie | ||||||
|  |   RewriteCond %{QUERY_STRING} !page=login | ||||||
|  |   RewriteRule ^(.*)$ %{REQUEST_URI}?page=login [L,R] | ||||||
|  | 
 | ||||||
|  | To rewrite a request if it's a search result from google. | ||||||
|  | 
 | ||||||
|  |   RewriteCond %{HTTP_REFERER} ^http://www\.google [NC] | ||||||
|  |   RewriteRule ^ http://www.somewhere.com/something.gif [R] | ||||||
|  | 
 | ||||||
|  | To simple forward your request to your internal server2 on port 8080: | ||||||
|  | 
 | ||||||
|  |   RewriteEngine On | ||||||
|  |   RewriteRule ^/app/(.*)$ http://server2:8080/app1/$1 [P] | ||||||
| @ -0,0 +1,14 @@ | |||||||
|  | <b>Clustered AwStats</b> | ||||||
|  | 
 | ||||||
|  | To use AWStats in a multiple vhost environment, you can make a new crontab for | ||||||
|  | every new site. But that's not very smart. I made this script to look at the | ||||||
|  | AWStats configuration files and parse all the access.log.1.gz files for all the | ||||||
|  | different sites. | ||||||
|  | 
 | ||||||
|  | It's made for my servers, so probably you have to change something for your own | ||||||
|  | environment. Make sure your AWStats config match this config and exchange SSH | ||||||
|  | key's for the AWStatst user to the webservers (read)! The access logging of the | ||||||
|  | Apache servers in the example below should be | ||||||
|  | /var/log/apache2/sitename/access.log.1.gz | ||||||
|  | 
 | ||||||
|  | You can find the script <a href='__SITEURL__/scripts/awstats_cron'>here</a>. | ||||||
| @ -0,0 +1,25 @@ | |||||||
|  | <b>backup and restoring partitions</b> | ||||||
|  | 
 | ||||||
|  | You always wonder how to make a backup of a complete disk? For example to rescue | ||||||
|  | the disk, or you want to save te data for later on? Or mayby to make an image | ||||||
|  | and distribute it over a lot of computers? Here is how. | ||||||
|  | 
 | ||||||
|  | Make a backup of a partition (this could also be the whole disk): | ||||||
|  | 
 | ||||||
|  | One-to-one: | ||||||
|  |   dd if=/dev/hdx1 of=/path/to/image | ||||||
|  | 
 | ||||||
|  | To a compressed image: | ||||||
|  |   dd if=/dev/hdx2 | gzip > /path/to/image.gz | ||||||
|  | 
 | ||||||
|  | To mount the partition on a local directory: | ||||||
|  |   mount -o loop /path/to/image /mnt | ||||||
|  | 
 | ||||||
|  | To restore a partition (first make sure the partition on disk is the same size or | ||||||
|  | bigger than the original): | ||||||
|  | 
 | ||||||
|  | One-to-one: | ||||||
|  |   dd if=/path/to/image of=/dev/hdx1 | ||||||
|  | 
 | ||||||
|  | From a compressed image: | ||||||
|  |   gzip -dc /path/to/image.gz |dd of=/dev/hdx2 | ||||||
| @ -0,0 +1,119 @@ | |||||||
|  | <b>Install Debian testing on an iBook G4</b> | ||||||
|  | 
 | ||||||
|  | Fact one, I still have an iBook G4 and little use to it. Fact two, sometimes I | ||||||
|  | still miss my linux desktop. (Mac OS X is not that bad) Combine those two facts | ||||||
|  | and we are going to install Debian Testing on an iBook G4. | ||||||
|  | 
 | ||||||
|  | <b>Getting the software</b> | ||||||
|  | I used the netinstaller from | ||||||
|  | http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/powerpc/iso-cd/ | ||||||
|  | Burn the debian-testing-powerpc-netinst.iso to a CD. (I know, it's an old medium) | ||||||
|  | 
 | ||||||
|  | <b>Do an installation</b> | ||||||
|  | Boot your iBook and insert the CD. Press 'c' and hold while or before | ||||||
|  | Apple-Boot-Sound to start from CD. Maybe you have to boot it again if you are too | ||||||
|  | slow. He asks you what you want to do. type | ||||||
|  | 
 | ||||||
|  |   install video=ofonly | ||||||
|  | 
 | ||||||
|  | The debian installer doesn't like the iBook's graphic card. Proceed like a normal | ||||||
|  | Debian installation, until the disk layout. | ||||||
|  | 
 | ||||||
|  | <b>Disk partitioning</b> | ||||||
|  | Choose for 'guided partitioning'. Then you will get an reconfigured partitionschema | ||||||
|  | which you can change. You will see an extra partition, the 'Apple' type partition. | ||||||
|  | Change your disk partition like you want, but keep the first Apple partition!!! | ||||||
|  | Otherwise it can't format the drive. I did it my way the first time and had some | ||||||
|  | problems formatting my drive. Maybe it's a bug in testing, but I couldn't find the | ||||||
|  | Apple type, but it worked using the 'guided partitioning'. | ||||||
|  | 
 | ||||||
|  | This is my partition table: | ||||||
|  | 
 | ||||||
|  |   IDE1 master (hda) - 120.0 GB FUJITSU MHV2120AT | ||||||
|  |   #1 32.3 kB Apple | ||||||
|  |   #2 1.0 MB B K boot untitled | ||||||
|  |   #3 7.0 GB f ext4 untitled / | ||||||
|  |   #4 3.5 GB f swap swap swap | ||||||
|  |   #5 109.6 GB f ext4 untitled /home | ||||||
|  | 
 | ||||||
|  | If you got the error 'Partition map has no partition map entry' after writing the | ||||||
|  | partition table to disk, you forgot to make the first Apple partition. | ||||||
|  | 
 | ||||||
|  | Your system will reboot. | ||||||
|  | 
 | ||||||
|  | Choose the parts you want to install. I simply only choose to install basics and | ||||||
|  | laptop. All the rest I will do by myself. | ||||||
|  | 
 | ||||||
|  | Reboot into your new OS. The first thing I noticed was the fan. It sounds like a | ||||||
|  | broken fan. After about 5 minutes it scaled down to zero and the noise was gone. | ||||||
|  | 
 | ||||||
|  | <b>Console tools</b> | ||||||
|  | Just aptitude install gpm. This will install gpm, the mouse interface for the | ||||||
|  | console. An USB mouse will work out of the box. | ||||||
|  | 
 | ||||||
|  | <b>X</b> | ||||||
|  | Installing X is a bit strange in Debian because of the Radeon Mobility 9200. Main | ||||||
|  | problem is the framebuffer loaded at boot time. The next can be done by every | ||||||
|  | windowmanager, but I prefer KDE. Make sure your /etc/apt/sources.list contains | ||||||
|  | besides main, also the contrib and non-free repo's. | ||||||
|  | 
 | ||||||
|  |   aptitude install xorg | ||||||
|  |   aptitude install kde-standard | ||||||
|  |   aptitude install firmware-linux | ||||||
|  | 
 | ||||||
|  | Do not reboot now! It will freeze during boot. Add the following into your | ||||||
|  | /etc/yaboot.conf: | ||||||
|  | 
 | ||||||
|  |   image=/boot/vmlinux | ||||||
|  |   label=Linux | ||||||
|  |   read-only | ||||||
|  |   initrd=/boot/initrd.img | ||||||
|  |   append="video=ofonly video=radeonfb:off radeon.agpmode=-1" | ||||||
|  | 
 | ||||||
|  |   image=/boot/vmlinux.old | ||||||
|  |   label=old | ||||||
|  |   read-only | ||||||
|  |   initrd=/boot/initrd.img.old | ||||||
|  |   append="video=ofonly video=radeonfb:off radeon.agpmode=-1" | ||||||
|  | 
 | ||||||
|  | Then run: | ||||||
|  | 
 | ||||||
|  |   root@thuu:~# ybin -v | ||||||
|  |   ybin: Finding OpenFirmware device path to `/dev/hda2'... | ||||||
|  |   ybin: Installing first stage bootstrap /usr/lib/yaboot/ofboot onto /dev/hda2... | ||||||
|  |   ybin: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/hda2... | ||||||
|  |   ybin: Installing /etc/yaboot.conf onto /dev/hda2... | ||||||
|  |   ybin: Setting attributes on ofboot... | ||||||
|  |   ybin: Setting attributes on yaboot... | ||||||
|  |   ybin: Setting attributes on yaboot.conf... | ||||||
|  |   ybin: Blessing /dev/hda2 with Holy Penguin Pee... | ||||||
|  |   ybin: Updating OpenFirmware boot-device variable in nvram... | ||||||
|  | 
 | ||||||
|  | Now you may reboot. If you accidentally reboot your system before changing | ||||||
|  | yaboot and you are stuk at the message: | ||||||
|  | 
 | ||||||
|  |   conflicting fb hw usage radeondrmfb | ||||||
|  | 
 | ||||||
|  | Give during boot time in the yaboot menu the command: | ||||||
|  | 
 | ||||||
|  |   boot: Linux video=radeonfb:off radeon.agpmode=-1 | ||||||
|  | 
 | ||||||
|  | It will boot again with the right options. | ||||||
|  | 
 | ||||||
|  | <b>Wireless</b> | ||||||
|  | First, make sure in your /etc/apt/sources.list contains the contrib packages. | ||||||
|  | Update your repository and install the package b43-fwcutter. Download the | ||||||
|  | firmware for the b43 from | ||||||
|  | 
 | ||||||
|  |   http://downloads.openwrt.org/sources/broadcom-wl-4.150.10.5.tar.bz2 | ||||||
|  | 
 | ||||||
|  | Untar the broadcom code and cd into the driver directory | ||||||
|  | 
 | ||||||
|  |   b43-fwcutter -w /lib/firmware/ wl_apsta_mimo.o | ||||||
|  | 
 | ||||||
|  | And your Wireless is working. (can somebody test this again? Maybe I missed | ||||||
|  | something) | ||||||
|  | 
 | ||||||
|  | <b>Bluetooth</b> | ||||||
|  | Bluetooth is working out of the box. Install btscanner to see it for yourself. | ||||||
|  | Config files are in /etc/bluetooth. | ||||||
| @ -0,0 +1,16 @@ | |||||||
|  | <b>How to remove debian packages</b> | ||||||
|  | 
 | ||||||
|  | The normal way to remove a Debian package is to use | ||||||
|  | 
 | ||||||
|  |   apt-get remove name | ||||||
|  | Or | ||||||
|  |   aptitude remove name | ||||||
|  | 
 | ||||||
|  | But in this way you are left with a bunch of configuration files. You can remove | ||||||
|  | individual package configuration with: | ||||||
|  | 
 | ||||||
|  |   apt-get purge name | ||||||
|  | 
 | ||||||
|  | Or all those packages that has been removed, but not completely: | ||||||
|  | 
 | ||||||
|  |   dpkg -l | grep ^rc | cut -d' ' -f3|xargs dpkg -P | ||||||
| @ -0,0 +1,33 @@ | |||||||
|  | <b>iPhone headset button</b> | ||||||
|  | 
 | ||||||
|  | The headphone of my iPhone has some more capabilities beside taking calls or | ||||||
|  | start and pause music. I found some information on the internet. | ||||||
|  | 
 | ||||||
|  | Incoming call: | ||||||
|  | 1. Press once to pickup the call | ||||||
|  | 2. Press twice to send the call to voicemail. | ||||||
|  | 3. Press and hold center button for about two seconds to decline the call. You | ||||||
|  |    will also hear two low beeps that confirm you the call is declined. | ||||||
|  | 
 | ||||||
|  | While you're in a call, you can simply press once to end the call. | ||||||
|  | 
 | ||||||
|  | While you're in a call and there is a second incoming call, you can: | ||||||
|  | 1. Press once to switch to another call and put the current call on hold. Press | ||||||
|  |    the button again to switch to the first call. | ||||||
|  | 2. Press and hold the button for about two seconds to ignore the second call. | ||||||
|  | 
 | ||||||
|  | While you're not in a call, you can press the button once to activate iPod and | ||||||
|  | playback your music. | ||||||
|  | 
 | ||||||
|  | While you're listening to music in iPod, you can use the button to control the | ||||||
|  | music playback: | ||||||
|  | 1. Press once to pause the song and press again to resume it. | ||||||
|  | 2. Press twice to skip to the next song | ||||||
|  | 3. Press three time to go back to the previous song | ||||||
|  | 
 | ||||||
|  | For iPhone 3GS, the bundled headset is enhanced with volume control buttons. You | ||||||
|  | can use the "+" and "-" buttons to adjust the volume. And, one more thing. You | ||||||
|  | can press and hold the center button to activate voice control, which is a new | ||||||
|  | feature comes with iPhone 3GS. | ||||||
|  | 
 | ||||||
|  | (source: http://rdsbc.blogspot.com/2009/08/tips-iphone-headset-shortcuts.html) | ||||||
| @ -0,0 +1,49 @@ | |||||||
|  | <b>Install KiwiIRC on Debian</b> | ||||||
|  | 
 | ||||||
|  | A some people know, I use IRC a lot. Especially in combination with | ||||||
|  | ZNC, a bouncer for all my IRC connections. But sometimes you need an | ||||||
|  | IRC client in a browser with just your own settings. Therefore, how | ||||||
|  | to install the fantastic webbased IRC client Kiwiirc on a Debian based | ||||||
|  | server. | ||||||
|  | 
 | ||||||
|  | I presume you already have git working. Otherwise, install it | ||||||
|  | (apt-get install git). Fist we need a working server with node.js. So | ||||||
|  | let’s install all the software as root: | ||||||
|  | 
 | ||||||
|  |   apt-get install npm | ||||||
|  | 
 | ||||||
|  | The problem is that Debian uses the ‘nodejs’ binary, but the whole rest | ||||||
|  | of the world called this file ‘node’. So we have to link it to the | ||||||
|  | right name before starting the installer. | ||||||
|  | 
 | ||||||
|  |   ln -s /usr/bin/nodejs /usr/bin/node | ||||||
|  | 
 | ||||||
|  | After installing all the software, we could become the user with should | ||||||
|  | run KiwiIRC. Probably you wouldn;t want to run this as root! So find a | ||||||
|  | nice place to store the software (/home/kiwiirc if the user is called | ||||||
|  | kiwiirc) and make a git clone of the software tree. | ||||||
|  | 
 | ||||||
|  |   git clone https://github.com/prawnsalad/KiwiIRC.git && cd KiwiIRC | ||||||
|  | 
 | ||||||
|  | I ran into a problem with ZNC. It wouldn’t connect to ZNC, but it | ||||||
|  | should. After upgrading from stable to the development, it worked. If | ||||||
|  | you have no problems at all, stay with the stable branch. | ||||||
|  | 
 | ||||||
|  |   git checkout development | ||||||
|  | 
 | ||||||
|  | Copy the config file, edit it to your prefecences and do a rebuild. | ||||||
|  | This wil generate all you needed files. Remember that after changing | ||||||
|  | the configfile, you have to run the build script! | ||||||
|  | 
 | ||||||
|  |   cp config.example.js config.js | ||||||
|  |   nano config.js | ||||||
|  |   ./kiwi build | ||||||
|  | 
 | ||||||
|  | After all this trouble, you can start your webbased IRC client! The | ||||||
|  | first is for starting in the background, the second if you want to run | ||||||
|  | it in the forground, (debuging) | ||||||
|  | 
 | ||||||
|  |   ./kiwi start | ||||||
|  |   ./kiwi -f start | ||||||
|  | 
 | ||||||
|  | Happy chatting! | ||||||
| @ -0,0 +1,41 @@ | |||||||
|  | <b>LVM cheatsheet</b> | ||||||
|  | 
 | ||||||
|  | Here is a cheatsheet for LVM: | ||||||
|  | 
 | ||||||
|  | LVM exists in the following order: | ||||||
|  | 
 | ||||||
|  | -PV (physical volume) | ||||||
|  | -VG (volume group) | ||||||
|  | -LV (logical volume) | ||||||
|  | 
 | ||||||
|  | Create a physical volume | ||||||
|  | 
 | ||||||
|  |   pvcreate /dev/hdX1 | ||||||
|  |   pvscan | ||||||
|  |   pvdisplay | ||||||
|  | 
 | ||||||
|  | Create a volume group | ||||||
|  | 
 | ||||||
|  |   vgcreate vg_name /dev/hdX1 /dev/hdX2 | ||||||
|  |   vgscan | ||||||
|  |   vgdisplay | ||||||
|  | 
 | ||||||
|  | Create a logical volume | ||||||
|  | 
 | ||||||
|  |   lvcreate -L 10G -n lv_name vg_name | ||||||
|  |   lvscan | ||||||
|  |   lvdisplay | ||||||
|  | 
 | ||||||
|  | Activate an external LVM volume | ||||||
|  | Usefull when you are repairing an external harddisk with a LVM volume. | ||||||
|  | 
 | ||||||
|  |   lvscan | ||||||
|  |   lvchange -a y lv_name | ||||||
|  |   lvscan | ||||||
|  | 
 | ||||||
|  | Disable an external LVM volume | ||||||
|  | Usefull when you are repairing an external harddisk with a LVM volume. | ||||||
|  | 
 | ||||||
|  |   lvscan | ||||||
|  |   lvchange -a n lv_name | ||||||
|  |   lvscan | ||||||
| @ -0,0 +1,10 @@ | |||||||
|  | <b>How to backup a MySql database</b> | ||||||
|  | 
 | ||||||
|  | To backup all your databases from MySql, I made the <a href='__SITEURL__/scripts/sqlbackup'>this script</a>. | ||||||
|  | 
 | ||||||
|  | You can run this script from your crontab. Run this every night and it will dump | ||||||
|  | all of your databases added with a date into the directory /backup/sql You can | ||||||
|  | also remove the very old ones by crontab. My crontab looks like the following: | ||||||
|  | 
 | ||||||
|  |   0 0 * * * find /backup/sql/ -mtime +5 -exec rm -rf {} \; | ||||||
|  |   0 0 * * * /usr/local/bin/sqlbackup | ||||||
| @ -0,0 +1,22 @@ | |||||||
|  | <b>How to split a big file in smaler ones</b> | ||||||
|  | 
 | ||||||
|  | Sometimes you got the problem that a file is something too big. No problem. There | ||||||
|  | is a solution for that. The command split. | ||||||
|  | 
 | ||||||
|  | Split a file | ||||||
|  | How do we split a file? Simple. To split the file bigfile into smaller files from | ||||||
|  | 100 MB with the name smallfile00, smallfile01, smallfile02 etc. we do: | ||||||
|  | 
 | ||||||
|  |   split -d -b100m bigfile smallfile | ||||||
|  | 
 | ||||||
|  | If you want an extention, some people or program's like that, you can give them | ||||||
|  | an extention: | ||||||
|  | 
 | ||||||
|  |   for i in `ls smallfile*` do mv $i $i.abc; done | ||||||
|  | 
 | ||||||
|  | And you got all smaller files. | ||||||
|  | 
 | ||||||
|  | Join a file | ||||||
|  | Later on, to join the files together, you can use the command cat. | ||||||
|  | 
 | ||||||
|  |   cat smallfile* > bigfile | ||||||
| @ -0,0 +1,58 @@ | |||||||
|  | <b>Getting Wolfenstein (wolf) running in Debian</b> | ||||||
|  | 
 | ||||||
|  | Running games in Linux could be a pain in the ass. Here I tried to install | ||||||
|  | Wolfenstein. | ||||||
|  | 
 | ||||||
|  | Install your software. Probebly it goes to /usr/local/games/wolfenstein. And | ||||||
|  | of course make your openGL working. See the big internet for doing this. | ||||||
|  | 
 | ||||||
|  | If you start your game (./wolf) it will come up with the following error: | ||||||
|  | 
 | ||||||
|  | Wolf 1.1b linux-i386 Jan 17 2002 | ||||||
|  | ----- FS_Startup ----- | ||||||
|  | Current search path: | ||||||
|  | /home/rogier/.wolf/main | ||||||
|  | /usr/local/games/wolfenstein/main/mp_pakmaps0.pk3 (21 files) | ||||||
|  | /usr/local/games/wolfenstein/main/mp_pak2.pk3 (3 files) | ||||||
|  | /usr/local/games/wolfenstein/main/mp_pak1.pk3 (308 files) | ||||||
|  | /usr/local/games/wolfenstein/main/mp_pak0.pk3 (783 files) | ||||||
|  | /usr/local/games/wolfenstein/main/pak0.pk3 (4775 files) | ||||||
|  | /usr/local/games/wolfenstein/main | ||||||
|  | ./wolf.x86/main | ||||||
|  | 
 | ||||||
|  | ---------------------- | ||||||
|  | 5890 files in pk3 files | ||||||
|  | execing default.cfg | ||||||
|  | couldn't exec language.cfg | ||||||
|  | couldn't exec wolfconfig_mp.cfg | ||||||
|  | couldn't exec autoexec.cfg | ||||||
|  | Hunk_Clear: reset the hunk ok | ||||||
|  | Joystick is not active. | ||||||
|  | Bypassing CD checks | ||||||
|  | ----- Client Initialization ----- | ||||||
|  | ----- Initializing Renderer ---- | ||||||
|  | ------------------------------- | ||||||
|  | Loaded 714 translation strings from scripts/translation.cfg | ||||||
|  | ----- Client Initialization Complete ----- | ||||||
|  | ----- R_Init ----- | ||||||
|  | ...loading libGL.so: QGL_Init: Can't load libGL.so from /etc/ld.so.conf | ||||||
|  | or current dir: /usr/local/games/wolfenstein/libGL.so: cannot open shared | ||||||
|  | object file: No such file or directory | ||||||
|  | failed | ||||||
|  | ...loading libMesaVoodooGL.so.3.1: QGL_Init: Can't load libMesaVoodooGL.so.3.1 | ||||||
|  | from /etc/ld.so.conf or current dir: | ||||||
|  | /usr/local/games/wolfenstein/libMesaVoodooGL.so.3.1: cannot open shared object | ||||||
|  | file: No such file or directory | ||||||
|  | failed | ||||||
|  | ----- CL_Shutdown ----- | ||||||
|  | RE_Shutdown( 1 ) | ||||||
|  | ----------------------- | ||||||
|  | ----- CL_Shutdown ----- | ||||||
|  | ----------------------- | ||||||
|  | Sys_Error: GLimp_Init() - could not load OpenGL subsystem | ||||||
|  | 
 | ||||||
|  | <b>Solution</b> | ||||||
|  | There is nothing wrong, but Debian is missing a link. So make the link: | ||||||
|  | 
 | ||||||
|  | cd /usr/lib32/ | ||||||
|  | ln -s libGL.so.1 libGL.so | ||||||
| After Width: | Height: | Size: 25 KiB | 
| @ -0,0 +1,19 @@ | |||||||
|  |               <b>Welcome to Sciuro.org</b> | ||||||
|  | 
 | ||||||
|  | This is my simple place where I will put my thoughts and           _.-"""-, | ||||||
|  | knowlege on the world wide web.                                  .'  ..::. `\ | ||||||
|  |                                                                 /  .::' `'` / | ||||||
|  | <b>Why is it all text based?</b>                                      / .::' .--.=; | ||||||
|  | After trying different type's of websites and frameworks, I    | ::' /  C ..\ | ||||||
|  | came to the conclusion that they all are slow, difficult       | :: |   \  _.) | ||||||
|  | and not inuitive for a nerd like me. What I liked the most      \ ':|   /  \ | ||||||
|  | was the old text based website. So why not build one. :-)        '-, \./ \)\) | ||||||
|  | Beside that, it's also quite fast on the creepy Dutch               `-|   );/ | ||||||
|  | mobile network.                                                       '--'-' | ||||||
|  | 
 | ||||||
|  | <b>What can I find here?</b> | ||||||
|  | Everything I want. Solutions for problems I faced (<a href='__SITEURL__/howto/'>howto's</a>), scripts I use every | ||||||
|  | day, or ones in a while (<a href='__SITEURL__/scripts/'>scripts</a>), day to day thoughts (<a href='__SITEURL__/blog/'>blog</a>) and pictures | ||||||
|  | (<a href='__SITEURL__/photo/'>photo's</a>). And maybe a lot of other things. | ||||||
|  | 
 | ||||||
|  | Have fun! | ||||||
| @ -0,0 +1,15 @@ | |||||||
|  | <b>Links</b> | ||||||
|  | 
 | ||||||
|  | <b>Security</b> | ||||||
|  | -<a href='https://www.gnupg.org/gph/en/manual.html' target=new>GPG handbook</a> | ||||||
|  | -<a href='http://www.phillylinux.org/keys/terminal.html' target=new>GPG keysigning</a> | ||||||
|  | 
 | ||||||
|  | <b>Geocaching</b> | ||||||
|  | -<a href='http://www.geocaching.com/' target=new>Geocaching.com</a> | ||||||
|  | -<a href='http://www.openstreetmap.com' target=new>OSM charts</a> | ||||||
|  | -<a href='http://garmin.openstreetmap.nl' target=new>OSM charts for garmin devices</a> | ||||||
|  | -<a href='#empty' target=new>Routing on OSM charts</a> | ||||||
|  | 
 | ||||||
|  | <b>Scouting</b> | ||||||
|  | -<a href='http://www.scoutlink.net/' target=new>Scoutlink</a> | ||||||
|  | -<a href='http://pe1mew.nl/handboek/' target=new>Jota Handboek</a> | ||||||
| @ -0,0 +1,4 @@ | |||||||
|  | <b>Pollex autoroute</b> | ||||||
|  | 
 | ||||||
|  | Tijdens een stamopkomst is er een autorally gereden met diverse opdrachten en | ||||||
|  | hindernissen. | ||||||
| @ -0,0 +1,3 @@ | |||||||
|  | <b>Bikkelweekend uitzetten</b> | ||||||
|  | 
 | ||||||
|  | Foto's tijdens het uitzetten van het bikkelweekend in Heeze. | ||||||
| @ -0,0 +1,3 @@ | |||||||
|  | <b>Zurich</b> | ||||||
|  | 
 | ||||||
|  | Een weekend langs in Zurich. | ||||||
| @ -0,0 +1,3 @@ | |||||||
|  | <b>Oud en nieuw 2012-2013</b> | ||||||
|  | 
 | ||||||
|  | In Kandersteg met de LG en PBG. | ||||||
| @ -0,0 +1,42 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | # Variables | ||||||
|  | BASE_DIR=/opt/awstats | ||||||
|  | DATA_DIR=/opt/awstats-data/data | ||||||
|  | LOGS_DIR=/opt/awstats-data/logs | ||||||
|  | HTML_DIR=/opt/awstats-data/html | ||||||
|  | APACHE_LOG=/var/log/apache2 | ||||||
|  | CONFIG_DIR=$BASE_DIR/wwwroot/cgi-bin | ||||||
|  | 
 | ||||||
|  | # Which servers have all the access.log logfiles | ||||||
|  | SERVERS='server1 server2 server3' | ||||||
|  | 
 | ||||||
|  | # Make a list of all the sites that need parsing | ||||||
|  | SITES=`ls $CONFIG_DIR |egrep '^awstats.*\.conf$' |grep -v awstats.model.conf |sed -e 's/^awstats\.//' -e 's/\.conf$//'` | ||||||
|  | 
 | ||||||
|  | # Start making a simple HTML page with all the sites | ||||||
|  | echo "<center>" > $HTML_DIR/index.html | ||||||
|  | 
 | ||||||
|  | for s in $SITES; do | ||||||
|  | 
 | ||||||
|  |  # Copy the access logging to the local server | ||||||
|  |  for i in $SERVERS; do | ||||||
|  |   scp -q $i:$APACHE_LOG/$s/access.log.1.gz $LOGS_DIR/$i.$s.gz | ||||||
|  |  done | ||||||
|  | 
 | ||||||
|  |  # Combine and sort the logfile's | ||||||
|  |  $BASE_DIR/tools/logresolvemerge.pl $LOGS_DIR/*.$s.gz |gzip > $LOGS_DIR/$s.gz | ||||||
|  | 
 | ||||||
|  |  # Remove the server logfiles | ||||||
|  |  rm $LOGS_DIR/*.$s.gz | ||||||
|  | 
 | ||||||
|  |  # Update the statistics | ||||||
|  |  $BASE_DIR/wwwroot/cgi-bin/awstats.pl -config=$s -update | ||||||
|  | 
 | ||||||
|  |  # Remove the combined logfile | ||||||
|  |  rm $LOGS_DIR/$s.gz | ||||||
|  | 
 | ||||||
|  |  # Write an entry in the HTML file for this website | ||||||
|  |  echo "<a href='http://$s/awstats/awstats.pl'>$s</a><br />" >> $HTML_DIR/index.html | ||||||
|  | 
 | ||||||
|  | done | ||||||
| @ -0,0 +1,21 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | # Settings | ||||||
|  | MYSQL="$(which mysql)" | ||||||
|  | MYSQLDUMP="$(which mysqldump)" | ||||||
|  | GZIP="$(which gzip)" | ||||||
|  | MyUSER="sys_backup" | ||||||
|  | MyPASS="secretpassword" | ||||||
|  | DIR="/backup/sql" | ||||||
|  | NOW="$(date +"%Y-%m-%d")" | ||||||
|  | 
 | ||||||
|  | # Get all the databases in your server | ||||||
|  | DBS="$($MYSQL -u $MyUSER -p$MyPASS -Bse 'show databases')" | ||||||
|  | 
 | ||||||
|  | for db in $DBS | ||||||
|  | do | ||||||
|  |   if [ "$db" != "information_schema" ]; then | ||||||
|  |     FILE="$DIR/$db.$NOW.gz" | ||||||
|  |     $MYSQLDUMP --routines -u $MyUSER -p$MyPASS $db | $GZIP -9 > $FILE | ||||||
|  |   fi | ||||||
|  | done | ||||||
| @ -0,0 +1,5 @@ | |||||||
|  | <b>Graphs</b> | ||||||
|  | 
 | ||||||
|  |                 +-----+------+------+--------+--------+-----+-------+ | ||||||
|  |                 | <a href='__SITEURL__/servers/graph-314.html'>314</a> | <a href='__SITEURL__/servers/graph-chip.html'>Chip</a> | Dale | <a href='__SITEURL__/servers/graph-skippy.html'>Skippy</a> | <a href='__SITEURL__/servers/graph-slappy.html'>Slappy</a> | <a href='__SITEURL__/servers/graph-irc.html'>IRC</a> | <a href='__SITEURL__/servers/graph-lists.html'>Lists</a> | | ||||||
|  |                 +-----+------+------+--------+--------+-----+-------+ | ||||||
| @ -0,0 +1,22 @@ | |||||||
|  | <b>Layout servers</b> | ||||||
|  | 
 | ||||||
|  |  +---------+ | ||||||
|  |  |         | | ||||||
|  |  | Router  |---------+-----------+-----------+-----------+ | ||||||
|  |  |         |         |           |           |           | | ||||||
|  |  +---------+         |           |           |           | | ||||||
|  |       |         +---------+ +---------+ +---------+ +---------+ | ||||||
|  |       |         |         | |         | |         | |         | | ||||||
|  |   Internet      | Skippy  | | Slappy  | | IRC     | | Lists   | | ||||||
|  |       |         |         | |         | |         | |         | | ||||||
|  |       |         +---------+ +---------+ +---------+ +---------+ | ||||||
|  |       | | ||||||
|  |       | | ||||||
|  |       +--------------+-----------+-----------+ | ||||||
|  |       |              |           |           | | ||||||
|  |       |              |           |           | | ||||||
|  |       |         +---------+ +---------+ +---------+ | ||||||
|  |       |         |         | |         | |         | | ||||||
|  |       |         | 314     | | Chip    | | Dale    | | ||||||
|  |       |         |         | |         | |         | | ||||||
|  |       |         +---------+ +---------+ +---------+ | ||||||
| @ -0,0 +1,13 @@ | |||||||
|  | <b>Server Status</b> | ||||||
|  | 
 | ||||||
|  |  +--------+--------+ | ||||||
|  |  | Server | Status | | ||||||
|  |  +--------+--------+ | ||||||
|  |  | 314    | <font color='00FF00'>Ok</font>     | | ||||||
|  |  | Chip   | <font color='00FF00'>Ok</font>     | | ||||||
|  |  | Dale   | <font color='FF0000'>Error</font>  | | ||||||
|  |  | Skippy | <font color='00FF00'>Ok</font>     | | ||||||
|  |  | Slappy | <font color='00FF00'>Ok</font>     | | ||||||
|  |  | IRC    | <font color='00FF00'>Ok</font>     | | ||||||
|  |  | Lists  | <font color='00FF00'>Ok</font>     | | ||||||
|  |  +--------+--------+ | ||||||
					Loading…
					
					
				
		Reference in new issue