Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Codeingniter server path config

viagra ohne rezept viagra viagra ordnung in deutschland besten preis viagra viagra
kaufen cialis deutschland lieferung cialis cialis online ohne rezept cialis kaufen pillen gegen impotenz
|---------------------------------------------------------------
| SET THE SERVER PATH
|---------------------------------------------------------------
|
| Let's attempt to determine the full-server path to the "system"
| folder in order to reduce the possibility of path problems.
|
*/
if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE) {
	$index_path=str_replace("\\", "/", realpath(dirname(__FILE__)));
	$FILE=__FILE__;
}
if (file_exists($index_path."/codeigniter")!=true){
	$FILE=$_SERVER['SCRIPT_FILENAME'];
	$index_path=realpath(dirname($_SERVER['SCRIPT_FILENAME']));
}
$system_folder=$index_path.'/'.$system_folder;


gut preis levitra deutschland impotenz deutschland levitra levitra diskont online levitra deutschland
kamagra ubernachtung besten preis gut preis kamagra kamagra kamagra kaufen kamagra generika

Play sound for certain events in IRSSI

Perl script to allow sounds to be played for different events in IRSSI

Just keep adding handlers to IRSSI's pools pointing to different functions for different events or whatever you want.

use strict;
use vars qw($VERSION %IRSSI);

use Irssi;
$VERSION = '0.0.3';
%IRSSI = (
        authors     => 'Chrelad',
        contact     => 'blah@blah.blah',
        name        => 'alert',
        description => 'Play sounds for different events in IRSSI.',
        url         => 'http://google.com',
        license     => 'GNU General Public License',
        changed     => '$Date: 2007-02-07 12:00:00 +0100 (Thu, 7 Feb 2008) $'
);

#--------------------------------------------------------------------
# Created by Chrelad
# Feb 7, 2008
#--------------------------------------------------------------------

#--------------------------------------------------------------------
# The sound playing function for public message
#--------------------------------------------------------------------

sub pub_msg {
        my ($server,$msg,$nick,$address,$target) = @_;
        `mplayer -quiet ~/file.mp3 > /dev/null`;
}

#--------------------------------------------------------------------
# Irssi::signal_add_last / Irssi::command_bind
#--------------------------------------------------------------------

Irssi::signal_add_last("message public", "pub_msg");
#- end