home - services - guestblog


last update: 19.11.2009
LINUX STUFF
This page contains shellscripts, themes and other useful stuff I did for my own system. Feel free to copy and use, but I cannot guarantee that everything you'll find here will work for you. Anyway, just head to the guestblog if you have any question or comment...
 
Fluxtwitter

download it here
This is a very simple and small pygtk app that I wrote because I wanted a very simple twitter reader, with no fancy feature or button or post function, since I post to identi.ca with pidgin. The great fun of twitter being clicking on the links that your friends give, that function at least is supported...
Since version 0.2, fluxbox pseudo-transparency is now supported. This will currently only work in fluxbox (the app looks for a fluxbox background image). You can set the desired level of shading too.
 
Niroki fluxbox theme

Download it here
There is also a matching gtk theme.
  
Kenshiku fluxbox theme

download it here
This is a theme for fluxbox. To give best results, enable transparency and set toolbar alpha to 0 and menu and window alpha to 128.
  
Fluxweather

Download it here
This is a small application made primarily for fluxbox but can also be used on any system with a system tray supporting gnome. Just download the script somewhere, and configure a couple of settings, read the script file for info.
 
Tango colors for Urxvt

Just put the following lines in your .Xdefaults file:
urxvt*foreground: #f2f2f2
urxvt*background: #101010
urxvt*color0: #101010
urxvt*color1: #f13a21
urxvt*color2: #93f91d
urxvt*color3: #ffd00a
urxvt*color4: #004f9e
urxvt*color5: #ec0048
urxvt*color6: #2aa7e7
urxvt*color7: #f2f2f2
urxvt*color8: #1d202f
urxvt*color9: #ff361e
urxvt*color10: #ffc005
urxvt*color11: #93ff00
urxvt*color12: #0071ff
urxvt*color13: #ef0051
urxvt*color14: #4bb8fd
urxvt*color15: #a020f0
urxvt*transparent: true
urxvt*shading: 50
urxvt*fading: 50
urxvt*font: xft:Bitstream\ Vera\ Sans\ Mono:style=roman:pixelsize=13
urxvt*scrollBar: false
 
Simple firewall
This is a very simple firewall I was once taught by my friend Fabio. Just copy these lines in a blank file, make it executable, and have it executed some time during your init process. My favorite way is to add this in /etc/network/interfaces:
auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
post-up /etc/network/if-up.d/firewall.sh
This is the firewall script:
#!/bin/sh
# Cleans the iptables
iptables -F
# Enables internet connection sharing
modprobe iptable_nat
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
# Opens some ports (22=SSH, 1080=Socks)
iptables -A INPUT -p tcp --destination-port 22 -j ACCEPT
iptables -A INPUT -p tcp --destination-port 1080 -j ACCEPT
# Opens local network
iptables -A INPUT -p tcp --syn -s 192.168.0.0/255.255.255.0 -j ACCEPT
# Closes everything else
iptables -A INPUT -p tcp --syn -j DROP
 
dxf thumbnailer

Download it here
This application generates a 128x128px PNG image showing the contents of a DXF file. In order to speed up the image generation process, only a few types of entities are read, so complex files might not get rendered accurately or even fail to render. In order to use this program, you must configure your file manager to use it as a thumbnailer for dxf file type (mime type: image/x-dxf).

For thunar: Download this dxf-thumbnailer.Desktop file and place it in /usr/share/thumbnailers. That's it!

For nautilus: Open the gconf editor and add an entry to desktop->gnome->thumbnailers called

Other file managers: Honestly I don't know, I don't use any other, but most of them have a way of including thumbnailers. If you find a way to make it work, please tell me how and I'll include the instructions here.

 
dxf converter

Download it here
This python application converts a dwg file to a dxf 2007 file with same name. To use it, you must have wine installed, and set the correct path to the EveryDWG utility by editing this script. The EveryDWG utility can be downloaded free of charge from the opendwg website but you must agree to their license terms before downloading.
Usage: dxfconvert.py path/to/file.dwg
Options: -h, --help: prints this help message

 
my sources.list
This is just for me to remember, actually, but here it goes neverthless. These are my software repositories for Debian Testing. I have the Unstable index in there too, so be sure to set the appropriate priorities as explained here, or comment out the unstable line.
          # official debian repositories. Beware, there are unstable and experimental there.
	  deb http://ftp.br.debian.org/debian testing main contrib non-free
	  deb-src http://ftp.br.debian.org/debian testing main contrib non-free
	  deb http://security.debian.org/ testing/updates main contrib non-free
	  deb http://ftp.debian.org/debian experimental main
	  deb http://ftp.br.debian.org/debian unstable main contrib non-free
	  deb-src http://ftp.br.debian.org/debian testing main contrib non-free
	  # wine, to get the most recent version, much more updated than offcial debian
	  deb http://www.lamaresh.net/apt squeeze main
	  # google, mainly to get chrome updated
	  deb http://dl.google.com/linux/deb/ testing non-free
	  # debian multimedia, for ffmpeg with all non-free codecs
	  deb ftp://ftp.debian-multimedia.org testing main
	  # spring, a RTS game
	  deb http://ppa.launchpad.net/spring/ubuntu jaunty main
	  # wxwidgets, temporary hack to get a better version
	  deb http://apt.wxwidgets.org/ lenny-wx main
	  # unknown horizons, a CIV-style game
	  deb http://packages.unknown-horizons.org/squeeze weekly main
	  # opera
	  deb http://deb.opera.com/opera/ squeeze non-free
	  # playdeb, almost everything works on debian too
	  deb http://archive.getdeb.net/ubuntu karmic-getdeb games