Netgear WN3000RP mywifiext.net not found

  1. make sure the green light on the extender is turnd on after you plugged into the wall
  2. Try http://192.168.1.250 if http://www.mywifiext.net does not work
  3. If you still cannot access the extender, plug in a lan cable into the lan port on it bottom and connect it directly to your router. Then you should be able to access it via http://192.168.1.250
  4. Configure your repeater:
    4.1 Chose the Wifi you want to extend
    4.2 Enter the password and keep the same security policies
    4.3 Do NOT use the suggested SSID because it ends with _EXT. Instead remove “_EXT”; this way your Wifi devices will not have to add another SSID.
  5. It is perfectly normal that after you hit finish your browser displays page not found. The repeater uses DHCP and will get itself an new random IP.
  6. Remove the lan cable and unplug the extender from the wall for a few seconds.
  7. Plug it into the wall and everything should work fine.

Continue reading

Perl DBI how to escape single SQL quotes with regex

SQL escapes single quotes by replacing them with double single quotes. Search for Gigi D’Agostino should look like this:

SELECT * FROM artists WHERE name = 'Gigi D''Agostino'

In Perl the easiest way it to add the escaped quotes is by using a simple regex.

$look_for = "Gigi D'Agostino";
$look_for =~ s/\'/\'\'/g;
$query = "SELECT * FROM artists WHERE name = '$look_for'";
Continue reading

Use Java 6 and Java 7 on (X)ubuntu Eclipse

Install both Java versions

sudo apt-get install openjdk-6-jre
sudo apt-get install openjdk-7-jre

Check active version

java -version

Check installed versions

update-java-alternatives -l

In Eclipse go into
Project > Properties > Java Build Path > Add Library > JRE System Library > Alternate JRE

If your Java is not in it

  • Click on Installed JREs
  • Click Add
  • Click Standard VM
  • Choose Directory containing Java 6 (/usr/lib/jvm/java-6-openjdk-i386)

 

Map Java Thread Details to Linux processes

  1. Search for Java PID:
    top
    Example ouput:4170 blalub 25 0 6309m 5.2g 10m R 97.5 33.3 732:27.41 java
  2. Get a listing of all Java threads in Java Process with PID 4170:
    top -H -p 4170
  3. Find PID of JBoss:
    jps -l
    Example output: 4170 org.jboss.Main
  4. Using Server PID (4170) for thread dump
    jstack -l 4170 > jstack.log
  5. To find threads from the listing (top -H -p) in jstack.log thread PIDs have to be converted from decimal (listing) to nid hexdecimal (jstack) in jstack output

Hex converter: http://www.binaryhexconverter.com/decimal-to-hex-converter

Inspiration: http://www.lrr.in.tum.de/~petkovve/java_threads_stack.html

When 0 is true – grep exit status

If you want to use grep results in bash scripts then it can get confusing. Because if grep returns a result then its exit status is 0; if it does not return anything the exit status is 1.

So these two line mean, if my script my_clever_script.pl is currently not running.

ps ax | grep my_clever_script.pl | grep -v grep
if [ $? -eq 1 ]; then

 

http://www.gnu.org/software/grep/manual/html_node/Exit-Status.html