WARNING: The following code will REPLACE your existing firewall rules as it uses iptables-restore in order to add hundreds of individual ip rules into the INPUT chain very fast. #!/bin/bash rm -f /root/listed_ip_* wget -q -c –no-cache http://www.stopforumspam.com/downloads/listed_ip_90.zip -P /root/ –output-document=/root/listed_ip_90.txt.zip unzip /root/listed_ip_90.txt.zip > /dev/null BLOCKDB=/root/listed_ip_90.txt echo “*filter” >/tmp/iptables-save echo “:INPUT ACCEPT [0:0]” >>/tmp/iptables-save echo…
Force reboot of a remote linux machine
Enable sysreq echo 1 > /proc/sys/kernel/sysrq Send boot command to sysreq. Warning, this will NOT sync the filesystem. echo b > /proc/sysrq-trigger You can find other sysreq commands here: https://www.kernel.org/doc/Documentation/sysrq.txt Have fun!
Coduri Postale Romanesti – Android
Weekendul asta m-am jucat putin cu SDK-ul de Android. Ca test am facut o aplicatie pentru cautarea codurilor postale din romania, dupa adresa. Aplicatia poate fi descarcata de pe Android market de aici: Coduri Postale Romanesti . Aplicatia nu necesita conexiune la Internet, vine cu baza de date in ea (SQLite). Enjoy!
Could not create the Java virtual machine. error adding brasil.gov.br/brasil.gov.br.crt
If you are getting these kind of errors when you try to install java on debian under a virtual machine, then you perhaps need to increase the available memory.
How to check packet loss for VOIP purposes
Yesterday I had some problems with the VOIP connection. I heard my party very well but he could barely hear me. Normal run of mtr to the other host showed no packet loss but I was able to pinpoint the packet loss to the other party with mtr -n -s 200 -i 0.02 [ip-address] (you…
acerhk – gcc: -pg and -fomit-frame-pointer are incompatible
If you have problems compiling acerhk on the latest ubuntu distribution modify /usr/src/`uname -r`/Makefile and comment : ifdef CONFIG_FUNCTION_TRACER #KBUILD_CFLAGS+= -pg endif Remove the comment after the successful compile so you leave the sources as they were.
SPL-C ERROR – Please use the proper driver on Samsung CLP-310N printer
If you get this error written on the test page when using Ubuntu or any other Linux distribution, you should install the Samsung Unified Driver. I’ve followed the tutorial on http://ubuntuforums.org/showthread.php?t=341621 point II.c and then I’ve added the network printer as lpd:///PASSTHRU with Make and Model “Samsung CLP-310 Series (SPL-C)” (NOT Samsung CLP-310 Foomatic/foo2qpdl)
How to programmatically dump the threads list of a running java process in bash
It seems that jdb cannot accept commands from command line, so we must use expect. I created the following expect script dumpthreads You can use it like: dumpthreads java_process_pid #!/usr/bin/expect set pid [lindex $argv 0]; spawn jdb -connect sun.jvm.hotspot.jdi.SAPIDAttachingConnector:pid=$pid; expect “>”; send “threads\n”; expect “>”; send “quit\n”;
Midnight commander does not save the settings in Ubuntu
Today I encountered a strange problem with Midnight Commander 4.6.2 in Ubuntu. I wanted to change the default Ubuntu setting to use the internal edit. I actually like the mc internal editor and I want to use it. The problem was that the setting was not saved when I chosed “Save setup” even if a…
Emtec S800 board picture
Here is a picture of the internal board of my newly aquired Emtec S800 PVR. It works on Linux but Emtec was not so kind to provide the sources of the PVR application (there are some sources of an alternative OEM – Ellion available on the net). I needed to open the box to put…