Leave your neighbr a comment!
If you haven't noticed, there's a new button in the neighbrhood ... go to any post's permalink and you'll see the shiny new reply button!
neighbr: darthnuri
Share on Facebook
Share on Reddit
Share on StumbleUpon
Share on Twitter

neighbr: arguments.callee
Share on Facebook
Share on Reddit
Share on StumbleUpon
Share on Twitter
// like an array, but with one important difference
var myObj = {
    name : "Some Dude",
    age   : "20"
}
for (var i in myObj) {
    if (myObj.hasOwnProperty(i)) {
        alert(myObj[i]); // actual properties
    } else {
        // ignore inherited properties like "length"
    }
}

neighbr: darthnuri
Share on Facebook
Share on Reddit
Share on StumbleUpon
Share on Twitter
var myArray = new Array("I","Like","Pie");
for (var i in myArray) {
    alert(myArray[i]);
}

neighbr: darthnuri
Share on Facebook
Share on Reddit
Share on StumbleUpon
Share on Twitter
eh

neighbr: darthnuri
Share on Facebook
Share on Reddit
Share on StumbleUpon
Share on Twitter
Why are you still patching StarCraft? Hurry up and finish StarCraft 2 already!

neighbr: darthnuri
Share on Facebook
Share on Reddit
Share on StumbleUpon
Share on Twitter
class inursql {

	function connect($hostname, $username, $password, $database) {

		global $hostname, $username, $password, $database;

		$c = mysql_connect($hostname, $username, $password) or die(mysql_error());
		mysql_select_db($database, $c);

		return $c;

	}

	function query($sql) {

		$query = mysql_query($sql) or die(mysql_error());

		return $query;

	}

	function grab($query) {

		$array = mysql_fetch_assoc($query);

		return $array;

	}

	function pick($query) {

		$array = mysql_fetch_row($query);

		return $rows;

	}

}

neighbr: arguments.callee
Share on Facebook
Share on Reddit
Share on StumbleUpon
Share on Twitter
        $ch = curl_init("http://www.google.com/");
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        $page = curl_exec($ch);
        curl_close($ch);

neighbr: darthnuri
Share on Facebook
Share on Reddit
Share on StumbleUpon
Share on Twitter
OBAMA!

neighbr: darthnuri
Share on Facebook
Share on Reddit
Share on StumbleUpon
Share on Twitter
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, 'http://www.google.com');
curl_exec ($curl);
curl_close ($curl);

neighbr: ellesd
Share on Facebook
Share on Reddit
Share on StumbleUpon
Share on Twitter
Source/README: http://townkill.org/projects/tcl/vhost.tcl

set opernick "eggdrop"
set operpass "eggdrop123"
set operchan "#opers"
set queuemsg "Your vhost has been qeued and awaiting approval. Thank you."
set admin1 "admin1"
set admin2 "admin2"
set file "ircd.vhosts"
set path "/path/to/ircd.vhosts"
## This will automatically oper up on connect if set as 1 
set operonconnect "1" 


## Do NOT edit below this line unless you know what you are doing.
proc evnt:init_server {type} {
	global operpass opernick operonconnect
	if {$operonconnect == "1"} { 
	putserv "OPER $opernick $operpass"
	return 1
		} else {
	return 0
 }
}

proc reqvhost {nick uhost hand arg} {
	global operchan admin1 admin2 w1 w2 w3 queuemsg
	set arg [split $arg]
	set w1 [lindex $arg 0]
	set w2 [lindex $arg 1]
	set w3 [lindex $arg 2]
	putserv "PRIVMSG $operchan : User: \00315 $nick \003 ( $uhost ) has requested login/pass/vhost: $w1 / $w2 / $w3 . Awaiting approval."
	putserv "PRIVMSG Memoserv : send $admin1 User: $nick ( $uhost ) has requested login/pass/vhost: $w1 / $w2 / $w3  . Awaiting approval."  
	utimer 10 "[putserv "PRIVMSG $operchan : Notifying admins..."]"
	putserv "PRIVMSG Memoserv : send $admin2 User: $nick ( $uhost ) has requested login/pass/vhost: $w1 / $w2 / $w3 . Awaiting approval."
	putserv "PRIVMSG $nick : $queuemsg"
	return 1
}

proc appvhost {nick uhost hand arg} {
	global operchan path file w1 w2 w3 admin1 admin2	
	if {$nick != $admin1} {
		putserv "NOTICE $nick : You do not have permission to use this command."
		return 0
	} elseif {$nick != $admin2} {
		putserv "NOTICE $nick : You do not have permission to use this command."
		return 0
	} else {
		putserv "NOTICE $operchan : User: \00315 $nick \003 ( $uhost ) has approved the vhost."
		set fs [open $path/ircd.vhosts a]
		set arg [split $arg]
		set w1 [lindex $arg 0] 
		set w2 [lindex $arg 1]
		set w3 [lindex $arg 2]  
		puts $fs "vhost { vhost $w3; from { userhost *@*; }; login $w1; password $w2; };"
		close $fs
		putserv "REHASH"	
		putserv "NOTICE $operchan : $arg added. Rehashed the server."
		putserv "PRIVMSG $w1 : Your vhost: $w1 / $w2 / $w3 has been accepted."
		return 1
	}

}

proc apphost {nick uhost handle channel arg} {
	global operchan path file w1 w2 w3
	if {$channel == $operchan} {
		putserv "NOTICE $operchan : User: \00315 $nick \003 ( $uhost ) has approved the vhost."
                set fs [open $path/ircd.vhosts a]
                set arg [split $arg]
                set w1 [lindex $arg 0]
                set w2 [lindex $arg 1]
                set w3 [lindex $arg 2]
                puts $fs "vhost { vhost $w3; from { userhost *@*; }; login $w1; password $w2; };"
                close $fs
                putserv "REHASH"
                putserv "NOTICE $operchan : $arg added. Rehashed the server."
                putserv "PRIVMSG $w1 : Your vhost: $w1 / $w2 / $w3 has been accepted."
                return 1
	} else {
		putserv "NOTICE $nick : You cannot use that command in this channel."
		return 0
	}
}

proc oup {nick uhost handle arg} {
	global opernick operpass admin1
	if {$nick != $admin1} {
	putserv "NOTICE $nick Sorry, you must be the admin to use this command."
	return 0
		} else {
	putserv "OPER $opernick $operpass"
	return 1
	}
}

bind pub - !approve apphost 
bind msg - !operup oup 
bind msg - !request reqvhost 
bind msg - !approve appvhost 

set ver "v1.3"
putlog "vhbot.tcl $ver © James Michigan 2003 loaded."

neighbr: ellesd
Share on Facebook
Share on Reddit
Share on StumbleUpon
Share on Twitter
print "Goodbye Cruel World!\n"

neighbr: ellesd
Share on Facebook
Share on Reddit
Share on StumbleUpon
Share on Twitter
Came

neighbr: neighbrhood
Share on Facebook
Share on Reddit
Share on StumbleUpon
Share on Twitter
You can now share code snippets with the neighbrhood! Click on the Share button, and then Code from the menu that appears. If your snippet is 1C, Axapta, Bash, C#, C++, CSS, DOS .bat, Delphi, Django, HTML, XML, Ini, Java, Javascript, Lisp, MEL, PHP, Perl, Python, Python profile, RenderMan, Ruby, SQL, Smalltalk, VBScript, or diff, your code will be beautified and displayed in style!

neighbr: darthnuri
Share on Facebook
Share on Reddit
Share on StumbleUpon
Share on Twitter
require_once 'Zend.php';
require_once 'Zend/Uri/Exception.php';
require_once 'Zend/Uri/Http.php';
require_once 'Zend/Uri/Mailto.php';

abstract class Zend_Uri
{

  /**
   * Return a string representation of this URI.
   *
   * @see     getUri()
   * @return  string
   */
  public function __toString()
  {
      return $this->getUri();
  }

  static public function factory($uri = 'http')
  {
      $uri = explode(':', $uri, 2);
      $scheme = strtolower($uri[0]);
      $schemeSpecific = isset($uri[1]) ? $uri[1] : '';

      // Security check: $scheme is used to load a class file,
      // so only alphanumerics are allowed.
      if (!ctype_alnum($scheme)) {
          throw new Zend_Uri_Exception('Illegal scheme');
      }
  }
}

neighbr: ellesd
Share on Facebook
Share on Reddit
Share on StumbleUpon
Share on Twitter
sharper..

74
Neighbr