Skip to content

SHINee(샤이 니)_RingDingDong(링딩동)_뮤직비디오

2010 April 17
by dlarmeir

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
—————————————

installing Nginx with php fast-cgi on Ubuntu

2010 April 17
by dlarmeir

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.

Fixing blank pages on mediawiki

2010 April 17

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 :)

Setting up a simple NFS share

2010 March 27
by dlarmeir

I migrated to Citrix Xenserver yesterday and needed an ISO storage point for my custom OS installs – the easiest solution for this? NFS ( Network File System ) This awesome tool is way to mount other machines across the network as if it was a local file system. In this case I am using an internal backend network that is non-internet facing to share these files with my Xenserver host from a vm. In a nutshell here is a quickway to get a simple share up and running.

This information assumes that 10.8.126.83 is the NFS server and that 10.8.126.82 is the NFS client.

With CentOS/RedHat – NFS and everything needed comes pre-installed by default. You may need to install the nfs-utils packages as shown below:

[root@dev ~]# rpm -qa | grep nfs
nfs-utils-1.0.9-42.el5
system-config-nfs-1.3.23-1.el5
nfs-utils-lib-1.0.8-7.6.el5

and you will need to make sure it is configured to start at boot time:

[root@dev ~]# chkconfig --list | grep nfs
nfs             0:off   1:off   2:on    3:on    4:on    5:on    6:off
nfslock         0:off   1:off   2:off   3:on    4:on    5:on    6:off

Server configuration:

In my example here I created a directory called /export/iso for my xenserver iso repository. In order to get this properly shared you will need to create an /etc/exports entry like what shown below:

[root@dev ~]# cat /etc/exports
/export/iso     (insecure,no_root_squash,rw)

Now we will use exportfs to get the NFS server to start serving this directory:

[root@dev ~]# exportfs -ra
exportfs: No host name given with /export/iso (insecure,no_root_squash,rw), suggest *(insecure,no_root_squash,rw) to avoid warning

This gives us a warning based on my config but does not affect the operation. You can set this to serve off a specific hostname if you wish.

Now you will need to add the NFS client ip/hostname to the /etc/hosts.allow config of the NFS server:

[root@dev ~]# cat /etc/hosts.allow
#
# hosts.allow   This file describes the names of the hosts which are
#               allowed to use the local INET services, as decided
#               by the '/usr/sbin/tcpd' server.
#
portmap: 10.8.126.82/255.255.255.0

From here it is now just a matter of mounting the share from the other system. In xenserver there is a storage addition gui for this but we will run through how to mount it from another Linux system as this is what most people will do with it anwyay:

[root@www ~]# mount 10.8.126.83:/export/iso /mnt/

and the end result is:

[root@www ~]# mount | grep mnt
10.8.126.83:/export/iso on /mnt type nfs (rw,addr=10.8.126.83)

and everything now works great!:

[root@www ~]# ls /mnt/
8.0-RELEASE-i386-disc1.iso  ubuntu-9.10-server-i386.iso
Fedora-12-i386-netinst.iso

There are tons of options for setting up NFS – my configuration is just for a very basic share.To learn more advanced usage I would check this site out http://nfs.sourceforge.net/ . I hope someone out there finds this useful.

Setting up a pptp vpn server on Debian and Ubuntu

2010 March 20
by dlarmeir

Yesterday I decided to setup a vpn server so a friend and I could play some coop mode on call of duty 5. This was so easy to setup I thought I would share it with the rest of the world:

Step 1.  Installing pptpd – the pptpd is the daemon that runs the pptp server. To install this just use apt-get:

$ apt-get install ssh pptpd -y

Step2. Next you will need to modify the pptpd.conf

$ vi /etc/pptpd.conf

Then scroll down to the bottom and modify the following lines with the subnets you would like assigned:

# (Recommended)
#localip 192.168.0.1
#remoteip 192.168.0.234-238,192.168.0.245
# or
localip 192.168.2.0
remoteip 192.168.2.2-238,192.168.2.245

Step 3. The vpn server is now configured and now you must setup authenticated users:

$ vi /etc/ppp/chap-secrets

The config file is very straight forward and I have an example of a user included:

# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
clown           pptpd  bigshoes               "*"

Step 4. When pptpd was installed it started automatically so we will need to restart it to apply the changes:

$ /etc/init.d/pptpd restart

Then just to make sure all is good lets check to make sure the service is listening:

 $ netstat -anp | grep pptpd
tcp        0      0 0.0.0.0:1723            0.0.0.0:*               LISTEN      7565/pptpd
unix  2      [ ]         DGRAM                    15781    7565/pptpd

If you see a listen on port 1723 you are ready to connect.

Optional: Now, if you would like to add internet access over this vpn, you can do this:

 $ vi /etc/sysctl.conf

and find the line for ipv4 forwarding and make sure it = 1:

# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1

The use iptables to get the net forwarded:

$ /sbin/iptables -P FORWARD ACCEPT
$ /sbin/iptables --table nat -A POSTROUTING -o eth0 -j MASQUERADE

Optionally you can install bind9 and have a DNS resolver you can use for the vpn connection:

$ apt-get install bind9 -y

Then start it:

$ /etc/init.d/bind9 start

The configuration of the vpn client that is connecting can be modified to use this DNS resolver now to allow for more control.

Connecting to the vpn from a Windows 7 client ( Click images to zoom in):

Step 1. Open the Network and Sharing center

Step 2. Set up a new connection or network

Step 3. Connect to a workplace

Step 4. No create a new connection if other connections exist

Step 5. Use my internet cconnection:

Step 6. Enter the internet address and name of the vpn connection

Step 7. Enter the username and password:

Step 8. Connect!!

This should pretty much cover all you need for the installation of a basic Debian or Ubuntu PPTP vpn server. Enjoy!