This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Why rewrite URLs? Read this: http://en.wikipedia.org/wiki/Rewrite_engine | |
# Apache (.htaccess or httpd.conf) | |
# Make sure AllowOverride is on for the directory, or put the rewrite rules in httpd.conf | |
# http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule . /index.php [L] | |
# Nginx (nginx.conf) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### BEGIN INIT INFO | |
# Provides: quasselcore | |
# Required-Start: $network $local_fs | |
# Required-Stop: | |
# Should-Start: | |
# Should-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: distributed IRC client using a central core component | |
# Description: This is the core component of Quassel. A modern, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* OperHelper | |
* | |
* A simple plugin to help opers with their tedious tasks. | |
* | |
* @author clone1018 | |
* @copyright Copyright (c) 2008 - 2011, Axxim | |
* @link http://axxim.net/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* OperHelper | |
* | |
* A simple plugin to help opers with their tedious tasks. | |
* | |
* @author clone1018 | |
* @copyright Copyright (c) 2008 - 2011, Axxim | |
* @link http://axxim.net/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.bf <prog> -- executes brainfuck program <prog> | |
.calc <term> -- returns Google Calculator result | |
.chnick <nick> - Change the nick! | |
.choose <choice1>, <choice2>, ... <choicen> -- makes a decision | |
.deadfly <adf.ly url> -- scrapes link shortened by adf.ly | |
.define/.dictionary <word> -- fetches definition of <word> | |
.down <url> -- checks to see if the site is down | |
.8ball <question> - ask the 8ball a question | |
.e/.etymology <word> -- Retrieves the etymology of chosen word | |
.expand <shorturl> -- expand link shortened url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function ping($host, $port=25565, $timeout=30) { | |
$handle = fsockopen($host, $port, $errno, $errstr, $timeout); | |
try { | |
fwrite($handle, "\xFE"); | |
$d = fread($handle, 256); | |
if ($d[0] != "\xFF") return false; | |
$d = substr($d, 3); | |
$d = mb_convert_encoding($d, 'auto', 'UCS-2'); | |
$d = explode("\xA7", $d); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ftp{ | |
public $conn; | |
public function __construct($url){ | |
$this->conn = ftp_connect($url); | |
} | |
public function __call($func,$a){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function humanReadableOctets($octets) { | |
$units = array('B', 'kB', 'MB', 'GB', 'TB'); | |
for ($i = 0, $size =$octets; $size>1024; $size=$size/1024) | |
$i++; | |
return number_format($size, 2) . ' ' . $units[min($i, count($units) -1 )]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
class linkextractor: | |
def __init__(self,htmlPage): | |
self.htmlcode = htmlPage | |
def getLinks(self): | |
linksList = re.findall('<a href=(.*?)>.*?</a>',self.htmlcode) | |
links = [] | |
for link in linksList: | |
if link.startswith('"'): link=link[1:] # Remove quotes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Welcome to Ignite | |
// Ignite is a new way to share, run and save code. | |
// | |
// You can get started by simply writing code, or pasting your | |
// existing code here. After that you can hit Play or Save. | |
// Playing code automatically compiles and saves it. | |
// | |
// If you find any problems feel free to join us on irc at | |
// irc.esper.net #axxim or email me at [email protected] |
OlderNewer