Today I have Marketing exam. Ofcourse as usual when I have exams I haven’t studied enough, and again I’m in the situation realizing I don’t know anything. I depend 100% on God’s grace to take that exam. Why I’m so dumb never study when
I have what I have. I can’t change my self I can’t study something I’m not interested into. Marketing is a subject which is simple but for Jerks IMHO :]. The logic of marketing is too abstract.
And yes what’s happening with me the last days. Well I’m feeling good now Praise the Lord. I’ve no idea what I should do with my life. I have 2 re-exams for now or maybe 3 ( I don’t know the results from the Research & Statistics Exam ).
The last few days I ran FreeDOS and Windows 2000 Pro SP4under FreeBSD 6.2 with qemu. FreeDOS’s performance is very nice despite the fact it is emulated. The Windows is running a little laggish although I ran it with kqemu ( Experimental Module for qemu which enhances the typical qemu speed ). Yesterday we drink a dark beer with Nomen into the “Happy Person” Pub. My passion for computers is starting to come back again.
Well I’m not so sick anymore. I’m feeling bad emotionally spiritually. I’m not sure. I have no idea what’s happening in my life. I don’t see the guidance of God. I’m having sexual thoughts and wan’t to sleep with some female, I guess this is not good since I’m a christian. Actually I really don’t have idea what to do with my life. FUCK I’m so LOST! I was out with Lily for a pizza and a coffee smoked 4 cigarettes then went to a new Market here in the town. Well the market was very brighty and clean, on two stages the one was a food/bevarage market. The other with tech stuff. Some time before we went to the market. My mood got fucked up and I stopped talking. Well shit why the Hell I’m here. I have a re-exam in Monday. It was supposed to study at something today. But my state didn’t allows me too. I just want to lay somewhere and die. I’m so lost I feel spiritually broken again. How much, how much will this thing continue. When will God bless me with that which my soul desires? Will I be alive for this moment? I’m wondering more and more. I’ve read some of my bible after I went home some prophecies about the End Times, the book was Ezdra. After that listened a little of NiN feeled even more bad than before right now I’m listening again to http://www.christianindustrial.net. Lord where are you leading me too? Why don’t see a vision for my life? Does my life have really a meaning and what it is. I’ve googled for some time for a phrase like “Christianity not working for me” and found a page which claimed. There is no life after death as classical Christianity claims and that heaven and hell are internal states experienced, here on earth, I think maybe there is some truth in this to some extent. Guess time will show (Or maybe Death).
Two months ago, I’ve developed a contact reservation form in PHP. The form is really easily customizable and is straight forward to integrate. I’ve developed the form for a small restaurant which was missing the feature on it’s joomla based website in order to be able for restaurant clients to reserve tables.
Here is how my restaurant reservation form looks like:
Later on I found there are plenty of possibilities to easily make a reservation form in Joomla but at that time I had no idea that custom contact forms can be prepared with Joomla, so I developed my own one from scratch in plain PHP and MySQL.
The form’s fields are in Dutch, because the form I’ve developed for a Dutch restaurant. However changing the form text is really easy,to do so open the php file and modify it, according to your needs. I decided to share here the reservation form in hope that it might be helpful to somebody out there. The Reservation form is licensed under GPLv2 so you’re very welcome to distribute and modify it freely.
The form installation is described in the README file you will find bundled with the reservation form archive.
For a number of time I’ve been planning to change my blog comments placement. Until this very day however I’ve kept the default wordpress theme’s Comments button placement.
I realize the default Comments button placement is a bit hard to see and not that much intuitive for the user that enters my blog for a first time.
My first guess was that there might be somewhere a wordpress plugin which will allow me to adjust my comments button placement. After some research online and a realization that probably there is no such plugin existing yet. I’ve forced myself to tune it up myself.
It was clear to me that in order to change the it will be necessery to edit the WordPress templates files. I’m not a designer and when I hear about templates I usually get scared, however I took the time to take a look at the default wordpress template and find out actually that template modifications is actually rather easier than I thought.
My previous idea was that in order to edit templates you have to be some kind of CSS and HTML guru (which I’m not). Nevertheless it seems that in order to play and adjust in a good way the templates you don’t need ot be a pro. Even an uneducated fool like myself can easily do almost everything he thinks of throughout few lines of code in the wp templates.
To get back to the major topic thanks God after a bit of review and reading of wordpress.org documentation and some user forums. I’ve figured out that in order to change my Comments placement you need to modify the file:
blog/wp-content/themes/default/index.php
In index.php find the line starting with:
You will notice within this opened paragraph the php code:
This is the actual default theme php code that makes the wordpress Comments or No Comments that maes the comments appear on the blog.
Now I’ve decided to let this be as it is but add one more Comment button to wordpress on a different location that is more appealing to my blog visitors
After quick evaluation I’ve determined that probably the best location that the Comments button should have is right after the end of the post text
If you think my idea for button placement is appropriate, to set this location for the Comments button, you will have to find the follwoing code in index.php:
<div class="entry">
<?php the_content('Read the rest of this entry »'); ?>
</div>
Right after the end of this code place the following code:
Since some time, I don’t know exactly where, after some updates of my WordPress running on a small server with FreeBSD 7.2. I’ve started getting a lot of Apache crashes. Often the wordpress scripts stopped working completely and I got only empty pages when trying to process the wordpress blog in a browser.
After a bunch of reading online, I’ve figured out that the cause might be PHP APC stands for Alternative PHP Cache .
I was not sure if the PHP running on the server had an APC configured at all so I used a phpinfo(); script to figure out if I had it loaded. I saw the APC among the loaded to show off in the list of loaded php modules, so this further led me to the idea the APC could be really causing the unexpected troubles.
Thus first I decided to disable the APC on a Virtualhost level for the domain where the crashing wordpress was hosted, to do I placed in the VirtualHost section in the Apache configuration /usr/local/etc/apache2/httpd.conf the following config directive:
php_flag apc.cache_by_default Off
These get me rid of the multiple errors:
PHP Warning: require_once() [function.require-once]: Unable to allocate memory for pool. in /usr/local/www/data-dist/blog/wp-content/plugins/tweet-old-post/top-admin.php on line 6
which constantly were re-occuring in php_error.log:
Further after evaluating all the websites hosted on the server and making sure none of which was really depending on APC , I’ve disabled the APC completely for PHP. To do so I issued:
echo 'apc.enabled = 0' >> /usr/local/etc/php.ini
Similarly on GNU/Linux to disable globally APC from PHP only the correct location to php.ini should be provided on Debian this is /etc/php5/apache2/php.ini .
I've experienced plenty of problems with Pulseaudio and Skype output sound hell crappy. This stupid proprietary program Skype is a total crap … Anyways again thanks to ArchLinux's wiki, I've used the two mentioned steps to fix all this Skype in / out problems …
1. Fix problems with Glitches, voice skips and crackling In file /etc/pulse/default.pa its necessery to substitute the line;
load-module module-udev-detect
with
load-module module-udev-detect tsched=0
2. Resolve Choppy sound in (Pulseaudio) -> Skype
In /etc/pulse/daemon.conf two lines has to be also substituted:
; default-sample-rate = 44100
Should become;
default-sample-rate = 48000
3. Change /etc/default/pulseaudio to allow dynamic module loading
It is a good idea to the default settings from DISALLOW_MODULE_LOADING=1 to DISALLOW_MODULE_LOADING=0 .This step is not required and I'm not sure if it has some influence on solving sound in / out problems with Skype but I believe it can be helpful in some cases..
So in /etc/default/pulseaudio Substitute:
DISALLOW_MODULE_LOADING=1
to;
DISALLOW_MODULE_LOADING=0
4. Restart PulseAudio server
After the line is changed and substituted a restart of PulseAudio is required. For PulseAudio server restart a gnome session logout is necessery. Just LogOff logged Gnome user and issue cmd:
debian:~# pkill pulseaudio
This will kill any left pulseaudio server previous instances.
My FreeBSD router has started running out of space, I looked for ways to clean up some space. So I remembered some programs are generating core files while they crash. Some of these files are really huge and ban be from 1Mb to > 1G.
I used find to first list all my produced core files starting from root directory (/) , like so:
find / -name core -exec du -hsc {} ;
....
Having a list of my core files with the respective core file size and after reviewing, I deleted one by one the cores which were there just taking up space. It’s a wise idea that core dumps file generation on program crash is completely disabled, however I forgot to disable cores, so I had plenty of the cores – (crash files which are handy for debug purposes and fixing the bug that caused the crash).
Further on I used an /etc/rc.conf – dumpdev=NO , variable which instructs the kernel to not generate core files on program crash:
freebsd# echo 'dumpdev=NO' >> /etc/rc.conf
Next, to make dumpdev=NO , take affect I rebooted the server:
freebsd# shutdown -r now
...
There is a way to instruct every server running daemon to know about the newly set dumpdev=NO by restarting each of the services with their init scripts individually, but I was too lazy to do that.
By accident, I’ve come across Towel.blinkenlight.nl! You might be wondering what is so special with it? 😉 Well some crazy guy seems to have recreated a whole Star Wars movie in ascii art!!! 😉
As I’m a great ascii fan I enjoy a lot, hope more people will take the time to watch the re-created Star Wars Movie in ASCII !. I’m eager to see if someone knows of any similar kind of movies, demos or all kind of stuff streamed via telnet 🙂
To give you an idea on what you will see by telnetting to towel.blinenlight.nl, here is a short chop video:
Sysctl is a great way to optimize Linux. sysctl has a dozens of values which could drastically improve server networking and overall performance.
One of the many heplful variables to optimize the way the Linuz kernel works on busy servers is net.ipv4.ip_local_port_range .
The default sysctl setting for net.ipv4.ip_local_port_range on Debian, Ubuntu Fedora, RHEL, CentOS is:
net.ipv4.ip_local_port_range = 32768 65536
This means that the kernel and the corresponding server running services instructing the Linuz kernel open new port sockets can only open local ports in the range of 32768 – 65536 . On a regular Desktop GNU/Linux machine or a not high iron server this settins is perfectly fine, however on a high scale servers the local port range in the interval of 32768-65536 might be insufficient at times, especially if there are programs which require binding of many local ports.
Therefore on a high load servers, generally it’s a good to raise the port range to be assigned by kernel to 8912 – 65536 , to do so the setting has to be changed like shown below:
If changing this setting on the server doesn’t show any negative impact on performance in few hours time or a day or even better decreases the server average load, it’s a good idea that it be added to sysctl.conf to load up the setting on next kernel boot.
How to change default Comments and No Comments location in WordPress in wordpress default theme
Tuesday, April 5th, 2011For a number of time I’ve been planning to change my blog comments placement. Until this very day however I’ve kept the default wordpress theme’s Comments button placement.
I realize the default Comments button placement is a bit hard to see and not that much intuitive for the user that enters my blog for a first time.
My first guess was that there might be somewhere a wordpress plugin which will allow me to adjust my comments button placement.
After some research online and a realization that probably there is no such plugin existing yet. I’ve forced myself to tune it up myself.
It was clear to me that in order to change the it will be necessery to edit the WordPress templates files. I’m not a designer and when I hear about templates I usually get scared, however I took the time to take a look at the default wordpress template and find out actually that template modifications is actually rather easier than I thought.
My previous idea was that in order to edit templates you have to be some kind of CSS and HTML guru (which I’m not). Nevertheless it seems that in order to play and adjust in a good way the templates you don’t need ot be a pro.
Even an uneducated fool like myself can easily do almost everything he thinks of throughout few lines of code in the wp templates.
To get back to the major topic thanks God after a bit of review and reading of wordpress.org documentation and some user forums. I’ve figured out that in order to change my Comments placement you need to modify the file:
In index.php find the line starting with:
You will notice within this opened paragraph the php code:
<?php the_tags('Tags: ', ', ', '
'); ?> Posted in <?php the_category(', ') ?>
| <?php edit_post_link('Edit', '', ' | '); ?>
<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
This is the actual default theme php code that makes the wordpress Comments or No Comments that maes the comments appear on the blog.
Now I’ve decided to let this be as it is but add one more Comment button to wordpress on a different location that is more appealing to my blog visitors
After quick evaluation I’ve determined that probably the best location that the Comments button should have is right after the end of the post text
If you think my idea for button placement is appropriate, to set this location for the Comments button, you will have to find the follwoing code in index.php:
<div class="entry">
<?php the_content('Read the rest of this entry »'); ?>
</div>
Right after the end of this code place the following code:
<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
</div>
Tags: amp, Auto, blog, Button, button placement, code lt, Comment, content themes, CSS, default theme, Draft, everything, file, fool, god, guess, guru, HTML, idea, index, kind, line, link, location, lt, nbsp, necessery, online, order, org, paragraph, php, php code, place, placement, plugin, quot, reading, realization, right, template, text, textIf, time, topic, way, Wordpress, wordpress plugin, wordpress templates
Posted in Various, Web and CMS, Wordpress | 1 Comment »