Larmeir.com
Dustin Larmeir's tech blog.
Dustin Larmeir's tech blog.
Apr 18th
I have been fishing for many of my 29 years of life and have found that of all the fish in the lake, I seem to catch more of the strange ones. Recently on my first fishing trip in Lake Lewisville ( been a couple of years ) I threw in a line and what did I catch? A Freshwater Drum! Some people have fished their whole lives not catching one of these, I have caught them countless times. I got a picture of the little fish below:
Just for fun Ill post the facts on this fish as stated from the Texas Department of Wildlife ( http://www.tpwd.state.tx.us/huntwild/wild/species/fwd/ )
Other Names
Drum Fish, Gaspergou, Gou, Sheepshead
Description
Aplodinotus is Greek for “single back”, and grunniens is Latin for “grunting”, referring to the fact that the species may be observed (or felt) making “grunting” sounds. Except for color, freshwater drum resembles its marine relative the red drum. The fish is deep-bodied and equipped with a long dorsal fin divided into two sections. The dorsal fin usually has 10 spines and 29-32 rays. Freshwater drum are silvery in color and lack the distinctive tail fin spot of red drum.
Life History
In Texas freshwater drum may spawn in April or May. Spawning seems to occur in open water. The eggs float until they hatch. Freshwater drum appear to be basically benthic, spending most of their time at or near the bottom. They feed primarily on fish, crayfish, and immature insects, often by rooting around in the substrate or moving rocks to dislodge their prey. The presence of heavy throat-teeth also allows them to consume mollusks to a certain extent. In Lake Erie, they have been found feeding on zebra mussels (although not nearly enough to control the zebra mussel population).
Distribution
Freshwater drum occurs in a variety of habitats, and is one of the most wide ranging fish latitudinally in North America. Populations can be found from Hudson Bay in the north to Guatemala in the south. East to west, the species ranges from the western slopes of the Appalachians to the eastern slopes of the Rockies. In Texas freshwater drum are ubiquitous exclusive of the Panhandle.
Other
Although freshwater drum is considered a rough fish by many anglers, it is prized as a food fish in some areas. Drum are also sought after as bait for other species. In Texas the rod and reel record exceeds 30 pounds, and the trotline record is 55 pounds.
Apr 17th
Well, my sister told me I only post computer gibberish on here
– so here is my family’s favorite Korean music video from Shinee. The reason it is our favorite is that our baby gets calm everytime this video gets played when he is upset. I think the busy’ness of the video is hypnotic LOL:
In case you want to know what they are saying in English ( Romanized )
—————————————
Baby
I’ve fallen, so why treat me like this?
Don’t run away in fear
but why not try trusting me.
My lady
Ring Ding Dong Ring Ding Dong
Ring Diggi Ding Diggi Ding Ding Ding
(x4)
Butterfly
From the moment I met you,
My eyes flashed, my head stopped
and a bell rang ding dong
Look, I may not be cool
nice, or anything like that
but I’m a pretty decent bad boy
You’re like a butterfly
So weak, I’ve fallen
So gentle, I’ve fallen
I have to have you near me
Don’t worry any more, any more
you only have to trust me
I’m really digging you
I can’t let you go
Baby
You stop my heart oh crazy
So pretty I can’t stand it oh crazy
I don’t need anything else crazy
Why am I like this?
We wanna go rocka rocka
rocka rocka rocka
So fantastic
So elastic
fantastic fantastic
fantastic fantastic
elastic elastic
elastic elastic
Ring Ding Dong Ring Ding Dong
Ring Diggi DingDiggi Ding Ding Ding
(I can only hear you)
Ring Ding Dong Ring Ding Dong
Ring Diggi DingDiggi Ding Ding Ding
(It’s ringing in my head)
Ring Ding Dong Ring Ding Dong
Ring Diggi DingDiggi Ding Ding Ding
(My heart is calling)
Ring Ding Dong Ring Ding Dong
Ring Diggi DingDiggi Ding Ding Ding
I call you butterfly
As the days go by
the idea that I can’t escape you
Gets driven in further
Choose me
(Don’t turn away)
Choose me
(Don’t run away)
You have to take responsibility
for this fool that’s fallen for you
Baby
You stop my heart oh crazy
So pretty I can’t stand it oh crazy
I don’t need anything else crazy
Why am I like this?
I don’t understand how you
caught the kindness syndrome
But it’s okay if you sometimes
break away from that stereotyped image
Break out (hey)
Break out (hey)
Break out (hey)
Break out (hey)
Ding Ding Ding Ding
Dong Dong Dong Dong
Honestly I’m nervous
as to how you see me,
You might, you just might
have a good impression of me.
I can’t help but
be on pins and needles.
I can’t turn away
Complicated girl
Please don’t respond with a ‘no’
I’m an pretty decent guy
But I might go crazy
Silly girl (silly girl)
You’re my miracle (my miracle)
If I could only have you
I don’t need anything else
Baby
You stop my heart oh crazy
So pretty I can’t stand it oh crazy
I don’t need anything else crazy
Why am I like this?
We wanna go rocka rocka
rocka rocka rocka
so fantastic
so elastic
fantastic fantastic
fantastic fantastic
elastic elastic
elastic elastic
Ring Ding Dong Ring Ding Dong
Ring Diggi DingDiggi Ding Ding Ding
(I can only hear you)
Ring Ding Dong Ring Ding Dong
Ring Diggi DingDiggi Ding Ding Ding
(It’s ringing in my head)
Ring Ding Dong Ring Ding Dong
Ring Diggi DingDiggi Ding Ding Ding
(My heart is calling)
Ring Ding Dong Ring Ding Dong
Ring Diggi DingDiggi Ding Ding Ding
—————————————

Apr 17th
Nginx is an awesome webserver and reverse proxy that is feature rich and super fast. Per wiki.nginx.org here is the description of the server:
———————————————————————————————————-
Nginx is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. Igor Sysoev started development of Nginx in 2002, with the first public release in 2004. Nginx now hosts nearly 6% (13M) of all domains worldwide.
Nginx is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.
Nginx is one of a handful of servers written to address the C10K problem. Unlike traditional servers, Nginx doesn’t rely on threads to handle requests. Instead it uses a much more scalable event-driven (asynchronous) architecture. This architecture uses small, but most importantly, predictable amounts of memory under load.
Even if you don’t expect to handle thousands of simultaneous requests, you can still benefit from Nginx’s high-performance and small memory footprint. Nginx scales in all directions: from the smallest VPS all the way up to clusters of servers.
———————————————————————————————————-
Let’s go over a basic installation.
Step 1. installing Nginx and php via apt
# apt-get install nginx php5-cgi
Step 2. Create a /usr/bin/php-fastcgi file and add the following to it:
#!/bin/sh /usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -f /usr/bin/php5-cgi
Then chmod it to be executable as is this the command that will be used to spawn the fastcgi server:
# chmod +x /usr/bin/php-fastcgi
Step 3. Create the file /etc/init.d/init-fastcgi and put the following in it:
#!/bin/bash
PHP_SCRIPT=/usr/bin/php-fastcgi
RETVAL=0
case "$1" in
start)
$PHP_SCRIPT
RETVAL=$?
;;
stop)
killall -9 php
RETVAL=$?
;;
restart)
killall -9 php
$PHP_SCRIPT
RETVAL=$?
;;
*)
echo "Usage: php-fastcgi {start|stop|restart}"
exit 1
;;
esac
exit $RETVAL
Then chmod it to be executable as well:
# chmod +x /etc/init.d/init-fastcgi
Step 5. Use updaterc.d to add the init script to boot time:
# update-rc.d init-fastcgi defaults update-rc.d: warning: /etc/init.d/init-fastcgi missing LSB information update-rc.d: see Adding system startup for /etc/init.d/init-fastcgi ... /etc/rc0.d/K20init-fastcgi -> ../init.d/init-fastcgi /etc/rc1.d/K20init-fastcgi -> ../init.d/init-fastcgi /etc/rc6.d/K20init-fastcgi -> ../init.d/init-fastcgi /etc/rc2.d/S20init-fastcgi -> ../init.d/init-fastcgi /etc/rc3.d/S20init-fastcgi -> ../init.d/init-fastcgi /etc/rc4.d/S20init-fastcgi -> ../init.d/init-fastcgi /etc/rc5.d/S20init-fastcgi -> ../init.d/init-fastcgi
Step 6. Configure the vhost in /etc/nginx/sites-enabled/default as needed and to pass php to the fastcgi server:
Example
# cat /etc/nginx/sites-enabled/default
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts
server {
listen 80;
server_name internal;
access_log /var/log/nginx/localhost.access.log;
location / {
root /var/www;
if (!-e $request_filename) {
rewrite ^/(.+)$ /?q=$1 last;
}
index index.html index.htm index.php;
}
location /doc {
root /usr/share;
autoindex on;
allow 127.0.0.1;
deny all;
}
location /images {
root /usr/share;
autoindex on;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
#error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root /var/www/nginx-default;
#}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
#proxy_pass http://127.0.0.1;
#}
######## pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
#deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
#listen 8000;
#listen somename:8080;
#server_name somename alias another.alias;
#location / {
#root html;
#index index.html index.htm;
#}
#}
# HTTPS server
#
#server {
#listen 443;
#server_name localhost;
#ssl on;
#ssl_certificate cert.pem;
#ssl_certificate_key cert.key;
#ssl_session_timeout 5m;
#ssl_protocols SSLv2 SSLv3 TLSv1;
#ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
#ssl_prefer_server_ciphers on;
#location / {
#root html;
#index index.html index.htm;
#}
#}
Step 7. Start Nginx and the init-fastcgi script:
/etc/init.d/nginx start; /etc/init.d/init-fastcgi start
Hints:
You can easily check if the services are running via netstat:
# netstat -anp | grep nginx tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 12392/nginx unix 3 [ ] STREAM CONNECTED 47780 12392/nginx unix 3 [ ] STREAM CONNECTED 47779 12392/nginx
d# netstat -anp | grep php tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 12333/php5-cgi
Also, if you encounter any configuration errors with Nginx this command will help:
d# /etc/init.d/nginx configtest Testing nginx configuration: the configuration file /etc/nginx/nginx.conf syntax is ok configuration file /etc/nginx/nginx.conf test is successful nginx.
This command is just like apachectl configtest and will give you the line of the error file.
Conclusion:
Nginx is an awesome free alternative to lightspeed in the webserver arena. I hope this article will help guide you through the installation of Nginx and if I missed anything let me know and I’ll add it.
Apr 17th
I installed media wiki today for a project of mine and noticed that it generated blank pages when trying to click on anything other than the main page. This was pretty annoying and google provided little for results on what normally fixes this. I dug into this using the methods below and eventually brought it to resolution:
Step 1. I knew that php was puking for some reason so I needed a verbose way of knowing why, by default php logging is not enabled in ubuntu server so I needed to edit the following directive in the /etc/php5/apache2/php.ini to get more info:
; Log errors into a log file (server-specific log, stderr, or error_log (below)) ; As stated above, you're strongly advised to use error logging in place of ; error displaying on production web sites. log_errors = On
Step 2. Now that logging was enabled I could get a better assessment of the error by tailing the apache log file:
# tail /var/log/apache2/error.log | grep php [Sat Apr 17 05:35:01 2010] [error] [client 192.168.1.3] PHP Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 14 bytes) in /var/www/wiki/includes/SpecialPage.php on line 234, referer: http://internal/wiki/index.php/Main_Page
Step 3. Now that I knew it was a php memory allocation issue I modified the php.ini to have more memory ( default was 16MB ):
memory_limit = 128M ; Maximum amount of memory a script may consume (16MB)
Step 4. But the error still existed… After doing some digging the ultimate resolution was to edit the memory_limit configuration directive to mediawiki itself in LocalSettings.php which was set to 20MB by default:
# If PHP's memory limit is very low, some operations may fail. ini_set( 'memory_limit', '32M' );
Once this was done the wiki started responding normally ![]()