This file contains 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 | |
$ip = '127.0.0.1'; | |
$port = '9051'; | |
$auth = 'PASSWORD'; | |
$command = 'signal NEWNYM'; | |
$fp = fsockopen($ip,$port,$error_number,$err_string,10); | |
if(!$fp) { echo "ERROR: $error_number : $err_string"; | |
return false; |
This file contains 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 MY_Model extends CI_Model{ | |
/** | |
* The table name | |
* | |
* @var string | |
* @access protected | |
*/ | |
protected $table = ''; |
This file contains 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 defined('BASEPATH') OR exit('No direct script access allowed'); | |
/* | |
|-------------------------------------------------------------------------- | |
| Enable/Disable Migrations | |
|-------------------------------------------------------------------------- | |
| | |
| Migrations are disabled by default but should be enabled | |
| whenever you intend to do a schema migration. | |
| | |
*/ |
This file contains 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 Migration_Users extends CI_Migration { | |
public function up(){ | |
$this->dbforge->add_field("id int(11) unsigned NOT NULL AUTO_INCREMENT"); | |
$this->dbforge->add_field("email varchar(255) NOT NULL DEFAULT ''"); | |
$this->dbforge->add_field("password varchar(255) NOT NULL DEFAULT ''"); | |
$this->dbforge->add_key('id', TRUE); | |
$this->dbforge->add_key('email'); |
This file contains 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 | |
/** | |
* PHP Authorization Class | |
* | |
* Authorization class for PHP. | |
* Usage Example: | |
* $can = new Can(); | |
* $can->user = $user; | |
* |
This file contains 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 | |
/** | |
* Tor Page Crawler | |
* | |
* Download web pages anonymously using the Tor network. | |
* Usage Example: | |
* $tor = new Tor(); | |
* | |
* $tor->setUrl('http://zacharyflower.com'); |
This file contains 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
on alfred_script(q) | |
tell application "Reminders" | |
set nr to make new reminder | |
set name of nr to q | |
end tell | |
end alfred_script |
This file contains 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
on run {input, parameters} | |
with timeout of (30 * 60) seconds | |
tell application "Finder" | |
repeat with anItem in the input | |
set parentFolder to container of anItem | |
set otherFiles to name of files in parentFolder | |
repeat with otherFile in the otherFiles | |
if otherFile ends with ".eyetvp" then | |
set xmlFile to (parentFolder as string) & ":" & otherFile |
This file contains 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 Node { | |
public $data = NULL; | |
public $next = NULL; | |
public function __construct($data = NULL) { | |
$this->data = $data; | |
} | |
} |
This file contains 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 is_anagram($a, $b) { | |
return(count_chars($a, 1)==count_chars($b, 1)); | |
} |
OlderNewer