You are here

morphir.com

morphir.com
Checked: 2 hours 11 min ago
Updated: 12 years 8 months ago
Update every: 2 hours


Subscribe to morphir.com

Drupal table overview

morphir.com - Sun, 05/10/2008 - 1:35pm

I have created a overview of the Drupal 6 tables with its respective primary keys, attributtes and indexes. It's handy to have as a reference. There is no relation overview between the tables at this point. But that would have been cool to have implemnted in a future version, indeed.

Gnomes "Trashcan" can indeed treat you bad

morphir.com - Sat, 02/08/2008 - 1:49am

Sometimes I happen to delete some files which I do not own when running the Gnome desktop. I go to empty my trashcan, and bam, I'm fucked. I am simply unable (impossible?!) to delete the files from graphical mode.

This is currently a big usability flaw with Gnome. Because the medicine is bringing up that virtual terminal. Then cd into
/home/username/.local/share/Trash/files
and issue the command
sudo rm -rf *
And all the sudden your trashcan should be empty once again. You can not keep shit in the trashcan for very long, or it will start to smell.

Javascript verification using SHA1

morphir.com - Sat, 10/05/2008 - 8:19am

One of the most modern ways of performing a malicious attack is using client side attack with javascript. What happens is, you visit a site, and that site got javascript that your browser executes. You continue to surf, while the javascript still continue to run in your browser. From there, only the imagination of the attacker stops him/her from what that malicious js should be doing. I wont elaborate the consequences, but this is a somewhat of a new trend on the internet. Specially now that firefox3 and opera both executes javascript with the blink of an eye these days.

Ternary in Python 2.5

morphir.com - Tue, 15/04/2008 - 11:37pm

Python 2.5 features a new ternary expression. Here is an example to clarify how it works:

In[1]: boolean=False

In[2]: answer = "yesss" if boolean==False else "noo"

In[3]: answer
Out[3]: 'yesss'

In[4]: answer = "yesss" if boolean==True else "noo"

In[5]: answer
Out[5]: 'noo'

Summary:
variabel = [expression-1] if [boolean-condition] else [expression-2]

Reference: http://www.python.org/dev/peps/pep-0308/

Make ipython behave even more like your bash

morphir.com - Sun, 30/03/2008 - 7:12pm

Ok, a little tip for all you ipython users out there.

If you are really used to the way your traditional bash shell works, there is one thing I found that ipython by default lacks. And that is the clear screen command. In ipython by default, you have the !clear command to clear your screen space. But it's not as efficient as the Ctrl+l keyboard shortcut. So I wanted this behavior in ipython too. Here is how you do it:

In your ~/.ipython/ipythonrc you should locate the line:

readline_parse_and_bind "\C-l": possible-completions

Datatype musings

morphir.com - Sun, 17/02/2008 - 6:48pm

Have you ever thought about the fact that the world most quoted theatrical phrase 'to be, or not to be' - by Hamlet - is really a boolean?

Have you ever gotten an error, and you are sure you've seen it before - but you can not recall what causes it?
Then you have just experienced a Déjà Foo(tm).

gvim refuses to load background color

morphir.com - Wed, 16/01/2008 - 8:51pm

I'm a avid user of gvim. You may have noticed that your color schemes don't load the correct background color (they do however in vim). In your .vimrc you have to add a little code snippet to solve this:
if has("gui_running")
   gui
   colorscheme golden
endif

Where golden is the name of the color scheme you want to use.

Cheers!

Configure avant-window-manager under KDE.

morphir.com - Fri, 27/07/2007 - 9:01pm

Install a binary or compile from source.
Since there are no graphical presentation of gconf available in KDE, we use the command line.
So in konsole we type:

gconftool -R /apps | grep avant

...this outputs...

/apps/avant-window-navigator:
/apps/avant-window-navigator/title:
/apps/avant-window-navigator/app:
/apps/avant-window-navigator/bar:
/apps/avant-window-navigator/window_manager:

Mark Shuttleworth with uPhone?

morphir.com - Tue, 24/07/2007 - 10:08pm

Are we witnessing Mark Shuttleworth carrying around the new uPhone (ubuntu phone)??

uPhone

Or does he simply need a new pair of jeans?

What is under the hood on digg.com?

morphir.com - Thu, 28/06/2007 - 2:50am

This slide lists the technology and solutions that powers the all so popular news site digg.com.
I thought this might be interesting reading for those of you who care about high performance.


md5 encryption at your fingertips

morphir.com - Thu, 07/06/2007 - 10:47am

I found my self in a dilemma here recently, I needed to generate my own md5 hash password on the fly (encryption).

So I found 3 ways to do this:


shell> php -r 'echo md5("test");'
--> 098f6bcd4621d373cade4e832627b4f6

mysql> select md5('test');
--> 098f6bcd4621d373cade4e832627b4f6

shell> echo -n test | md5sum
--> 098f6bcd4621d373cade4e832627b4f6

Learn more about md5 encryption here

A gem for graphic artists on Linux

morphir.com - Fri, 18/05/2007 - 12:20pm

Agave is not a groundbreaking application. None the less, it's one of those diamonds hidden in the dirt cases.
For a long time, I've missed the colorpicker that Macromedia Fireworks provided on Windows. And there it was, agave. A simple and must have application for all webdesigners and graphicartists. It's really just a colorscheme, but contain a colorpicker as well. A colorpicker is really nice to have when you wanna grab a certain colored pixel, and the colorscheme helps you decide what colors plays well together.

Druplicon haxX0r edition

morphir.com - Wed, 18/04/2007 - 11:39am
function drupal_load($type, $name){static $files = array();if (isset($files[$type][$name])
){return TRUE;$filena=rupal_get_filename($type, $name);if ($filename){include_once "./$filread more

Wanna find mp3 using google?

morphir.com - Thu, 15/03/2007 - 11:40pm

Sure, finding a mp3-file using google is not hard, in fact easy.

However when you wanna find the mp3 file of your favorite artist, you can use this die hard search string:


{-inurl:(htm|html|php) intitle:"index of" +"last modified" +"parent directory" +description +size +(wma|mp3) "artist goes here"}

Remember to change "artist goes here" with the name of the artist and if you want a specific song, type that in as well.

Automatical backup of Mysql - the fast, easy, secure and FREE way!

morphir.com - Tue, 13/02/2007 - 9:30pm

You have a website, maybe a forum or a blog. Sooner or later your hard drive crashes. And you thank God for having a fresh backup to pull out of your sleeves. No? Either way, here comes an tutorial on how to backup your mysql and prepare for the day of disaster.

Requires a MySQL server installed and configured

NOTE: Make sure your MySQL daemon has binary log option enabled. To enable it, simply add the following line to /etc/my.cnf, under the [mysqld] section:

log-bin

read more

morphir's CVS guide for Drupal part 1

morphir.com - Mon, 29/01/2007 - 4:23pm

If you are new to CVS and Drupal, and if you prefer(as me) to use command line(bash) instead of GUI based CVS programs.
Then this guide is for you!

There are basicly 5 stages:

Download drupal HEAD
Edit file
Test your patch on your local webserver
Create a patch
And apply the patch to drupal.org using your webserver

read more

Lighttpd - Install and configuration for Drupal

morphir.com - Tue, 02/01/2007 - 3:03am

Introduction

Lighttpd supports PHP through both CGI and FastCGI. As the name suggests, FastCGI is preferable.

FastCGI is a language independent, scalable, open extension to CGI that provides high performance without the limitations of server specific APIs.

FastCGI provides better scalability and performance. Instead of creating a new process (the CGI program) for every request, FastCGI uses a single persistent process which handles many requests over its lifetime.

Installation

On ubuntu:

SSL on Ubuntu edgy eft: A How to for apache2

morphir.com - Wed, 29/11/2006 - 11:09am

sudo apt-get install apache2
apache2-ssl-certificate
(and answer the questions)

Now, enable ssl:
a2enmod ssl

configure ssl:
cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
ln -s /etc/apache2/sites-available/ssl /etc/apache2/sites-enabled/ssl
"/etc/apache2/sites-enabled/ssl" should look like this:

NameVirtualHost *:443

(... configure the directories too...)
and "/etc/apache2/sites-enabled/default" should look like this:

NameVirtualHost *:80

How to keep bad robots, spiders and web crawlers away

morphir.com - Sun, 01/10/2006 - 5:44pm

Many so called webbots or web spiders are currently used for many different things on the Internet. Examples include search engines that use them to catalog the Internet, email marketing people that search for email addresses and many more.

Table of contents

* Trapped and/or Banned Robots
* Definition of a bad robot
* How to identify bad robots
* Banning bad robots from the site
* The Robot Trap
* Download the traps

read more

Gratis file sharing

morphir.com - Thu, 24/08/2006 - 6:42am

Speedyshare.com offers free of charge filesharing. You can upload files at maximum 68MB, but that is just the limit for one single file. You can upload 5 GB a day pr. IP-adress.

I recommend this service for spreading free software. No hazzle(It's no registration). But I would only download files that where uploaded by trustees(rootkits and viruses can be spread fast with this kind of service). However, I'am not familier with the license agreement as I wright this article.

Visit speedyshare.com

Steps to make a Slackware Package.

morphir.com - Thu, 27/07/2006 - 8:46pm

Step 1
Download the source code of the program.

Step 2
Unarchive the source.
tar zxvf foo-1.0.1.tar.gz

read more

Subscribe to morphir.com