Wednesday, June 20, 2012
Saturday, May 19, 2012
Linux file sharing for OSX
Do you want to share files from your Linux server to your Mac computers ?
ATALK_NAME=MyFileServer
Install netatalk (apt-get netatalk). Edit /etc/default/netatalk and make sure the following are as follows:
ATALK_NAME=MyFileServer
ATALKD_RUN=no
PAPD_RUN=no
AFPD_RUN=yes
TIMELORD_RUN=no
Share your directories by editing /etc/netatalk/AppleVolumes.default (one line per share):
~/ "LinuxHome" allow:adyhasch volcharset:UTF8 dbpath:/home/storage/.dbinfo options:noadouble,usedots,upriv
/home/storage "Storage" allow:adyhasch volcharset:UTF8 dbpath:/home/storage/.dbinfo options:noadouble,nohex,upriv,usedots,tm
Add the following line to /etc/netatalk/afpd.conf
-setuplog "default log_info /var/log/afpd.log"
-mimicmodel MacPro
To change the icon displayed in Finder, replace the value ofmimicmodel with one of the following values: Xserve,PowerBook, PowerMac, Macmini, iMac, MacBook, MacBookPro, MacBookAir, MacPro, AppleTV1,1, AirPort.
You should now have basic file sharing working. Open a Finder window on your Mac and from the menu, choose Go > Connect to server and in the dialog box add afp://mylinuxserver then press + or browse. You should now be able to browse your files. If something goes wrong, like it did on my machine,
cat /var/log/afpd.log
I had some "connection refused" messages looking like these:
May 19 12:26:27.844314 afpd[1386] {dsi_tcp.c:112} (W:DSI): refused connect from 10.0.0.32
May 19 12:26:27.844474 afpd[1386] {dsi_getsess.c:60} (E:DSI): dsi_getsess: Connection refused
May 19 12:26:27.844488 afpd[1386] {afp_config.c:226} (E:AFPDaemon): dsi_start: session error: Connection refused
You can also autoconfigure the file sharing service with Zeroconf, or Bonjour, or Avahi. On Debian I'm using the Avahi service. Go to /etc/avahi/services and add a new service file, afpd.service
Add the following to your service file:
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h Xserve</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>
Share your directories by editing /etc/netatalk/AppleVolumes.default (one line per share):
~/ "LinuxHome" allow:adyhasch volcharset:UTF8 dbpath:/home/storage/.dbinfo options:noadouble,usedots,upriv
/home/storage "Storage" allow:adyhasch volcharset:UTF8 dbpath:/home/storage/.dbinfo options:noadouble,nohex,upriv,usedots,tm
Add the following line to /etc/netatalk/afpd.conf
-setuplog "default log_info /var/log/afpd.log"
-mimicmodel MacPro
To change the icon displayed in Finder, replace the value of
You should now have basic file sharing working. Open a Finder window on your Mac and from the menu, choose Go > Connect to server and in the dialog box add afp://mylinuxserver then press + or browse. You should now be able to browse your files. If something goes wrong, like it did on my machine,
cat /var/log/afpd.log
I had some "connection refused" messages looking like these:
May 19 12:26:27.844314 afpd[1386] {dsi_tcp.c:112} (W:DSI): refused connect from 10.0.0.32
May 19 12:26:27.844474 afpd[1386] {dsi_getsess.c:60} (E:DSI): dsi_getsess: Connection refused
May 19 12:26:27.844488 afpd[1386] {afp_config.c:226} (E:AFPDaemon): dsi_start: session error: Connection refused
If you have similar messages, edit your hosts.allow :
afpd: ALL
You can also autoconfigure the file sharing service with Zeroconf, or Bonjour, or Avahi. On Debian I'm using the Avahi service. Go to /etc/avahi/services and add a new service file, afpd.service
Add the following to your service file:
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h Xserve</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>
To change the icon displayed in Finder, replace the value of model= with one of the following values: Xserve,PowerBook, PowerMac, Macmini, iMac, MacBook, MacBookPro, MacBookAir, MacPro, AppleTV1,1, AirPort.
Save and restart the avahi service:
/etc/init.d/avahi-daemon restart
Now you should see TWO servers in the finder network. One is what the Avahi service publishes, the other one is what AFP service is publishing. I guess one doesn't need the Avahi part .. o I moved the afpd.service file to a new directory named "disabled" and restarted the Avahi service.
If you run iptables, you need the following added to your config:
# AFP
-A INPUT -p tcp --dport afpovertcp -j ACCEPT
# AppleTalk
-I INPUT -p tcp -m multiport --dport at-rtmp,at-nbp,at-echo,at-zis -j ACCEPT
-I OUTPUT -p tcp -m multiport --dport at-rtmp,at-nbp,at-echo,at-zis -j ACCEPT
# Bonjour/Zeroconf
-I INPUT -p udp --dport mdns -d 224.0.0.251 -j ACCEPT
-I OUTPUT -p udp --dport mdns -d 224.0.0.251 -j ACCEPT
Happy sharing!
Saturday, March 17, 2012
Yamaha FZ1 Gen II technical - revised Q1 2012
Thanks to all the people who have contributed to this guide, especially Ballmead from FZ1-forum.com for the detailed information about geometry settings.
Check out these pages for guidance:
London Bikers, suspension setup demystified and Bikesetup.com
Riding style and conditions: 5-15 minutes. B-roads every weekend, frequent wheelies.Some town riding
Mileage:
5,0L/100KM Highway easy riding
8,6L/100KM Town commuting
Weight savers:
Removing the tools and center stand saves 1,3 Kg. The OEM silencer weighs 7 Kg, and replacing it with a Yoshimura TRC steel sleeve slip-on saves 3,5 kg. Removing the centerstand also makes getting the sidestand out easier. I put my center stand back though, since it makes it easier to clean the chain, it's more stable on grass and gravel, and frankly that kilo doesn't do much for either acceleration or handling.
Suspension adjustment
Rider weight: 110 KG + gear = 123 KG
London Bikers, suspension setup demystified and Bikesetup.com
Riding style and conditions: 5-15 minutes. B-roads every weekend, frequent wheelies.Some town riding
Mileage:
5,0L/100KM Highway easy riding
8,6L/100KM Town commuting
Weight savers:
Removing the tools and center stand saves 1,3 Kg. The OEM silencer weighs 7 Kg, and replacing it with a Yoshimura TRC steel sleeve slip-on saves 3,5 kg. Removing the centerstand also makes getting the sidestand out easier. I put my center stand back though, since it makes it easier to clean the chain, it's more stable on grass and gravel, and frankly that kilo doesn't do much for either acceleration or handling.
Suspension adjustment
Rider weight: 110 KG + gear = 123 KG
Worksheet for setting the sag: http://shaunsaxon.com/suspension-worksheet.pdf
Static sag front: 15mm (for the definition of sag, see above links
Static sag front: 15mm (for the definition of sag, see above links
Static sag rear: 40mm (the spring is too weak for my weight
Suspension adjustment fork:
Preload adjustment:
One+ spring preload indicator decreases fork travel by 8mm. The manual indicates 5,5 "clicks" as standard, 6 is too soft for me, the bike dives too much.
Setup scenario: I want my bike to be a bit stiffer as for inspired backroad driving, somewhat like a sports bike, but not as a bench (read: Ducati)
5 is firm-ish, but it looks like there's too much travel way left, about 50 mm by eye-measure.
With the spring preload at 5, You will feel potholes as with a german car with stiff springs. The fork will be a bit stiffer, the bike doesn't dive as much under braking, and the ride will be comfortable enough. This setup will swallow speed bumps at ~40 km/h without a problem.
You might want to try 4,5 or 4 to harden the preload, and make the bike dive even less.
Preload adjustment:
One+ spring preload indicator decreases fork travel by 8mm. The manual indicates 5,5 "clicks" as standard, 6 is too soft for me, the bike dives too much.
Setup scenario: I want my bike to be a bit stiffer as for inspired backroad driving, somewhat like a sports bike, but not as a bench (read: Ducati)
5 is firm-ish, but it looks like there's too much travel way left, about 50 mm by eye-measure.
With the spring preload at 5, You will feel potholes as with a german car with stiff springs. The fork will be a bit stiffer, the bike doesn't dive as much under braking, and the ride will be comfortable enough. This setup will swallow speed bumps at ~40 km/h without a problem.
You might want to try 4,5 or 4 to harden the preload, and make the bike dive even less.
Aim for between 10 and 20mm sag.
Compression damping: (left fork leg)
Standard is 5 clicks to the left. My setup is 6 clicks to the left. You'll want at least 6 clicks to the left if you're doing wheelies all the time. Landings are pretty hard otherwise.
1 click to the left is megastiff, like a bicycle. Speed bumps will be rock hard at 35 km/h.
26 clicks to the left will feel like you're jumping in bed, a jump, and you go up and down on the springs a couple of times. This will swallow the speed bump softly, but you'll bounce up and around after impact. Terrible sensation.
Rebound damping: (right fork leg)
Standard is 18 clicks to the left out of 28. My setup is 18 clicks to the left.
The standard is good for street riding, I don't feel the need to change it.
Suspension adjustment rear:
Tried 1+ preload, 10+ rebound. Bike spins on full throttle. Rebounds are too hard, you feel shocks in your back , even with smaller obstacles
Current setup: 3+ preload, 8+ rebound - default.
Spring preload:
Standard is 3 clicks, I run with 3 atm. I tried 1 click. Max preload is still too soft
Rebound damping:
Standard is 8, I tried 10, and the rebounds were a bit too hard, I felt the shocks in my back. Slower rebound can adjust chassis pitch, and slow down weight transfer to the front.
Also make sure You read the suspension setup info at the following pages:
http://ohlins.se/Products/OwnersManuals/OM_07241-02.pdf
http://www.gostar-racing.com/information/motorcycle_suspension_set-up.htm
http://londonbikers.com/articles/1616/suspension-setup-demystified
http://waynegardnerapproved.com.au/tech%20tips%201.htm (for Fireblades)
Geometry adjustment
Compression damping: (left fork leg)
Standard is 5 clicks to the left. My setup is 6 clicks to the left. You'll want at least 6 clicks to the left if you're doing wheelies all the time. Landings are pretty hard otherwise.
1 click to the left is megastiff, like a bicycle. Speed bumps will be rock hard at 35 km/h.
26 clicks to the left will feel like you're jumping in bed, a jump, and you go up and down on the springs a couple of times. This will swallow the speed bump softly, but you'll bounce up and around after impact. Terrible sensation.
Rebound damping: (right fork leg)
Standard is 18 clicks to the left out of 28. My setup is 18 clicks to the left.
The standard is good for street riding, I don't feel the need to change it.
Suspension adjustment rear:
Tried 1+ preload, 10+ rebound. Bike spins on full throttle. Rebounds are too hard, you feel shocks in your back , even with smaller obstacles
Current setup: 3+ preload, 8+ rebound - default.
Spring preload:
Standard is 3 clicks, I run with 3 atm. I tried 1 click. Max preload is still too soft
Rebound damping:
Standard is 8, I tried 10, and the rebounds were a bit too hard, I felt the shocks in my back. Slower rebound can adjust chassis pitch, and slow down weight transfer to the front.
Also make sure You read the suspension setup info at the following pages:
http://ohlins.se/Products/OwnersManuals/OM_07241-02.pdf
http://www.gostar-racing.com/information/motorcycle_suspension_set-up.htm
http://londonbikers.com/articles/1616/suspension-setup-demystified
http://waynegardnerapproved.com.au/tech%20tips%201.htm (for Fireblades)
Geometry adjustment
If You like me find the FZ1 a bit hard to steer into the corners and flick side to side, You will want to try some geometry adjustments before you trade it for a supersport. "Dropping the forks" is something a lot of FZ1 riders do, and is not dangerous in any way. The fork legs are actually raised in the triple clamps, and thus create a steeper steering angle, the bike tilts forward more, thus turning in quicker. The difference is like night and day. The torque for the upper pinch bolts is 26 Nm, and for the lower ones is 23 Nm.
The second thing You can do is change the rear shock to something fit for your weight (if you weigh over 80 kg, and the standard shock isn't good enough) for instance the Nitron NTR Sport , which comes at a reasonable price of around 360 GBP. Make sure you also get it set to a longer length, 325mm eye to eye, compared to the standard 320. This will also aid in turning quicker, further tilting the bike forwards.
Fuel gauge issues
The fuel gauge stays at 100% for over 90 km, then suddenly drops to 50% and then makes another sudden drop to the reserve. This was resolved by changing the fuel pump unit which has the fuel measurement unit incorporated. Now the gauge goes to
-1 dot after ~40 km
-2 dots after ~70 km
UPDATE: My Yamaha shop changed the fuel pump unit, which has the fuel meter incorporated, on the extended warranty. It's all good now!
Friday, November 18, 2011
Adoptera en grek
Det är nu möjligt att adoptera en grek för 5000 kronor i månaden, du får en i gott skick. För denna summan kan han göra allt du inte hinner med:
- han kommer att sova till klockan 12
- han kommer att läsa dagspressen
- han kommer att gå på café och fika
- han kommer att diskutera sport och politik
- han kommer att ta en tupplur på eftermiddagen
- på kvällen kommer han att gå till en restaurang, bar, eller kanske en terass
Bonus:
Den nya valutan i Grekland kommer att kallas för "Zeuro" (engelskt uttal)
Saturday, October 15, 2011
Samsung SmartTV traffic
My SmartTV does magic things without asking me, like installing new updates to SmartTV, adding apps, removing apps, disabling stuff in the menu, re-enabling it, etc. I've tried to sniff the network traffic it creates in order to find out what to block in order to stop it from communicating with external servers, but not to stop it from streaming movies from my computer. My findings are the following:

-the TV is creating a lot of ARP traffic.
-It tries to communicate over SSDP with 239.255.255.250 which means it's trying to find something by multicasting
No incoming traffic to 10.0.0.31 appears, maybe it's getting the updates over the cable provider's network.
Please comment if you have any more information on how these updates work.
EDIT:
Actually I later realized that all I saw was the broadcast traffic, because of the switched network. I'll have to re-do this next time the TV gets on my nerves with connecting to Samsung and downloading updates.
Wednesday, October 12, 2011
Undercover Mac
This app really is "undercover". You download it to try it, but there's no trial license. So you uninstall it.
BUT: it leaves behind a system service that still talks to their servers. Just open a console window, or a task manager window, and search for uclocator.
Download Lingon, a launchd editor, find the uclocator service, stop it and disable it. Then go to /Library/LaunchAgents/ and remove com.orbicule.uclocator.plist which is the service descriptor file.
In order to get rid of ALL of it I also removed /usr/bin/uc directory. Now everything should be gone.
Trust noone ;)
Monday, September 05, 2011
Samsung UE46D65 LED TV bugs
So I got my new TV-set and already I found some bugs, even if this model is considered to be among the top Samsung range. The following is probably true for all Samsung sets with the SmartTV function.
1. When manually editing the channel list, you press edit on a channel, and if that same channel exists at a previous channel number, the previous channel number opens up in EDIT mode. Idiotic
2. If a network connection problem exists, you cannot exit the "login to Smart ID" menu. You have to turn off the TV
3. If you turn off the TV during an update, it won't boot again. Unplug powercord and wait a couple of minutes for it to "settle" then plug in the power again and it boots. Pheww ..
4. You cannot remove certain installed software, such as Facebook, Social TV. It ends up in a "special" uneditable place. Arrgh ..
5. You can't actually remove added accounts from the Smart Hub configuration menu (D)
6. You cannot access Smart Hub directly after start, because you get an "Installing" prompt which blocks any other operation for like 3 minutes.
7. The system updates on it own, without your permission. It also installs software that Samsung selects for You. No, thanks, I really don't want that, Samsung..
8. There's no skipping in the media player.
Allow me a couple more days to find more issues ...
A new update auto-flashed, and now I don't have accounts any more, and I can't remove software. Great ..
Sunday, July 31, 2011
Sunday, July 03, 2011
Switzerland 2011
Just started a new travel blog for the summer vacation:
http://rideswitzerland.blogspot.com
http://rideswitzerland.blogspot.com
Monday, June 06, 2011
Friday, May 20, 2011
Saturday, April 30, 2011
Tuesday, April 19, 2011
Saturday, April 02, 2011
Download HQ or HD video from Youtube and convet to mp3
Well the title says it all. Copy the Youtube URL, and go to www.keepvid.com where you paste it into the search field. Click the "high definition" mp4 file link to download (sometimes it's just "high quality") but it's going to be enough for the treadmill or car stereo.
When you've saved enough videos to one directory, use the following script to convert them to mp3. You will need faad and lame (or twolame)
#!/bin/bash
#hacked by adrian (at) javaguru [dot] org
if [ -f /usr/bin/faad ]
then
if [ -z $1 ]
then
echo "Usage: mp3-to-mp3 / all"
exit 0
fi
if [ $1 != "all" ]
then
if [ -f $1 ]
then
echo Processing $1
faad $1
#filename change
FNAME_LENGTH=${#1}
FEXT_INDEX=$((FNAME_LENGTH-4))
echo Filename length: $FNAME_LENGTH
WAVFILE=${1:0:$FEXT_INDEX}.wav
echo $WAVFILE created. Processing...
# Running lame encoder
echo Running lame mp3 encoder with 256kbps and HQ settings
lame -h -b 256 $WAVFILE
# process filenames
MP3FILE=$WAVFILE.mp3
NEWMP3FILE=${MP3FILE:0:$FEXT_INDEX}.mp3
mv $MP3FILE $NEWMP3FILE
echo Deleting intermediate WAV file
rm -v $WAVFILE
echo $NEWMP3FILE created. Enjoy!
fi
else
if [ $1 == "all" ]
then
# removing keepvid.com tag
find . -name "*keepvid*" -exec rename -v 's/\_\[www.keepvid.com\]//'$
find . -name "*.mp4" -exec mp4-to-mp3 {} \;
fi
fi
else
echo /usr/bin/faad missing! Exiting
fi
When you've saved enough videos to one directory, use the following script to convert them to mp3. You will need faad and lame (or twolame)
#!/bin/bash
#hacked by adrian (at) javaguru [dot] org
if [ -f /usr/bin/faad ]
then
if [ -z $1 ]
then
echo "Usage: mp3-to-mp3
exit 0
fi
if [ $1 != "all" ]
then
if [ -f $1 ]
then
echo Processing $1
faad $1
#filename change
FNAME_LENGTH=${#1}
FEXT_INDEX=$((FNAME_LENGTH-4))
echo Filename length: $FNAME_LENGTH
WAVFILE=${1:0:$FEXT_INDEX}.wav
echo $WAVFILE created. Processing...
# Running lame encoder
echo Running lame mp3 encoder with 256kbps and HQ settings
lame -h -b 256 $WAVFILE
# process filenames
MP3FILE=$WAVFILE.mp3
NEWMP3FILE=${MP3FILE:0:$FEXT_INDEX}.mp3
mv $MP3FILE $NEWMP3FILE
echo Deleting intermediate WAV file
rm -v $WAVFILE
echo $NEWMP3FILE created. Enjoy!
fi
else
if [ $1 == "all" ]
then
# removing keepvid.com tag
find . -name "*keepvid*" -exec rename -v 's/\_\[www.keepvid.com\]//'$
find . -name "*.mp4" -exec mp4-to-mp3 {} \;
fi
fi
else
echo /usr/bin/faad missing! Exiting
fi
Wednesday, February 16, 2011
Tuesday, January 25, 2011
OpenSSH root from localhost
restrict root to only be able to use ssh from localhost
Try out following entry:
AllowUsers root@localhost
If the pattern takes the form USER@HOST then USER and HOST are separately checked, restricting logins to particular users from particular hosts.
Try out following entry:
AllowUsers root@localhost
If the pattern takes the form USER@HOST then USER and HOST are separately checked, restricting logins to particular users from particular hosts.
Sunday, January 23, 2011
Packning för MC-resa
Packa smart = det du behöver ofta längst upp
Kolla kedjan - spänn om nödvändigt
Extra pass & pengar i styrändarna
Foto på pass och körkort i GMails inbox kanske redan laddat i telefonen
Whiskey i plastflaska
2-4 öl
Stödplatta
Ficklampa
Klart visir
Karta/kartbok
Kamera
Kniv
Vattenflaska
Reparationskit (punkaspray, verktyg, straps, multiverktyg, silvertejp)
Liten kedjesprej
Extra handskar, varma
Mikrofiberduk/handduk
Yllestrumpor Stadium
Extranyckel till motorcykeln, förvaras på annan plats (halskedja)
Tandborste, tandkräm, deo
Tvättlapp
Kolla kedjan - spänn om nödvändigt
Extra pass & pengar i styrändarna
Foto på pass och körkort i GMails inbox kanske redan laddat i telefonen
Whiskey i plastflaska
2-4 öl
Stödplatta
Ficklampa
Klart visir
Karta/kartbok
Kamera
Kniv
Vattenflaska
Reparationskit (punkaspray, verktyg, straps, multiverktyg, silvertejp)
Liten kedjesprej
Extra handskar, varma
Mikrofiberduk/handduk
Yllestrumpor Stadium
Extranyckel till motorcykeln, förvaras på annan plats (halskedja)
Tandborste, tandkräm, deo
Tvättlapp
Thursday, December 23, 2010
Monday, December 06, 2010
Subscribe to:
Posts (Atom)














