Author Archive for Rolf

download simpleviewer images

nFlickrViewer Demo  - www.chaimjaskoll.com
How to download images in a gallery where a simpleviewer is used as a flashviewer in front:

U=http://www.simpleviewergallery-somewhere-host.NETNET/gallery ; 
for a in `wget -q -O- $U/gallery.xml | egrep -o "filename>[^<]+" | cut -d\> -f2 ` ; do wget $U/images/$a ; done

mount WebDav in Ubuntu/Linux from FireFox

Gallery_mount_with_webDavOn a standard photo Gallery, you can select to mount Gallery on your desktop with a WebDAV client. I searched for an easy solution to mount webdav from the browser but was not able to find any scripts doing so with only one click. See the first picture to see how you find the link on a Gallery 2.0.

Here is the simple script: (Read more for an advanced script)

#!/bin/sh
 
DAVURL=`cat "$1" | grep ":url" | egrep -o "http[^< \"]+"`
DIR=`echo $DAVURL | egrep -o "[a-zA-Z0-9\.]" |xargs | sed s/\ //gi`
MOUNTPATH="/media/webdav.$DIR"
 
gksu -- mkdir $MOUNTPATH
gksu -- mount.davfs -onoaskauth $DAVURL $MOUNTPOINT
nautilus $MOUNTPOINT

Continue reading ‘mount WebDav in Ubuntu/Linux from FireFox’

Facebook chat changed after upgrading to Firefox 3.5

apt-get install firefox-3.5 changed the name of firefox to Shiretoko. After the browser upgrade, the facebook chat did not work as before.

To make the FaceBook work again, I installed the User Agent Switcher and added some user-agents.

Here is how my facebook chat menu was looking when I reported using Shiretoko as UserAgent:
chatmenu-missing2

When switching the UserAgent to report FireFox, I got the normal chat menu back:
chat-menu-missing

Epoch to human

How often haven’t I needed to convert a Epoch timestamp (unixtime) to Human readable format?

 

 
 

From commandline:

date -d @1000000000

(replace 1000000000 with your epoch, needs newer version of date)

For more reading, see http://www.epochconverter.com/

twitter from commandline

Here is a oneliner to submit twitter messages via curl to twitter. I found it here

curl –basic –user “yourusername:yourpasswd” –data-ascii “status=`echo $@|tr ‘ ‘ ‘+’`” “http://twitter.com/statuses/update.json” -o /dev/null; echo Message Sent!

Bash: Get latest version of iTunes

Here is a small oneliner to fetch/update the latest version of iTunes.msi AppleMobileDeviceSupport.msi QuickTime.msi and SetupAdmin.exe

wget -q -O- http://swcatalog.apple.com/content/catalogs/others/index-windows-1.sucatalog | grep "061-6666" | egrep -o "http.*\.(msi|exe)" | xargs wget -N

061-6666 is the software key for iTunes.

The -N parameter on wget will make wget only download if the file on the webserver has newer timestamp than the local file.

undefined symbol: Perl_Tstack_sp_ptr

I got this error after a upgrade of perl on my ubuntu desktop station:

rolf@untuome:~/.xmltv$ tv_grab_no_gfeed --output /home/rolf/.xmltv/tv_grab_no_gfeed.xml
/usr/bin/perl: symbol lookup error: /home/rolf/.perl/lib/perl5/i486-linux-gnu-thread-multi/auto/List/Util/Util.so: undefined symbol: Perl_Tstack_sp_ptr
rolf@untuome:~/.xmltv$ mv /home/rolf/.perl/lib/perl5/i486-linux-gnu-thread-multi /tmp
rolf@untuome:~/.xmltv$ tv_grab_no_gfeed --output /home/rolf/.xmltv/tv_grab_no_gfeed.xml
downloading listings

Oneliner: Download csv of all major IP-blocks for countries:

Oneliner to download countries in .csv files. Great for building f.ex firewall (iptables?) rules with special rules for countries:

for a in `wget -q -O- http://nirsoft.net/countryip/ |egrep -o "\"..\.html" |sed -e s/^\"// -e s/\.html//` ; do wget http://nirsoft.net/countryip/$a.csv ; done

Synergy over sshtunnel

A ssh tunnel will slow down the mouse pointer which can result in a slow response on the client machine. But it will encrypt and secure the input information like your passwords typed on the keyboard. Synergy sends these unencrypted over the network.

Here is how to do it:

On the machine you are using(typing on), run synergy bound to the lo (localhost) interface. Synergys will act as a keyboard and mouse server for the machines you want to control. Do it like this:

synergys -a localhost

Remember that you need to have a /etc/synergy.conf for synergys: On the machine you using(typing on). There you need to specify that SynclientName has access to connect to you.

Then, start the ssh port-tunnel by forwarding port 24800 on localhost yourmachine connecting to it’s own localhost on port 24800:

ssh -R localhost:24800:localhost:24800 yourmachine

Start the synergy client on the machine you want to remotely control and connecting it to localhost (which is ssh-tunneled to yourmachine)

DISPLAY=:0 sudo synergyc -n SynclientName localhost

This was only a small howto on connecting two linux machines with synergy.

How to download over 6000 Free True Type fonts?

A small script to download over 6000 free TrueType Fonts from a webpage.
This script should be for learning purpose only. Removing XX makes you guilty!
Continue reading ‘How to download over 6000 Free True Type fonts?’