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
http | |
https | |
ftp | |
ftps | |
sftp | |
rt | |
a | |
able | |
about | |
above |
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
/*********************************************************************** | |
MySQL Session class | |
This class encapsulates everything needed to store your PHP sessions | |
in a MySQL database. To use it simply call Session::start() instead | |
of session_start(). | |
You'll need a table like this in your database. You can change the | |
name but the fields should remain as they are defined here. |
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 | |
// Table: An ActiveRecord-style DB abstraction class | |
// Copyright (c) 2005-2006 Stuart Dallas | |
// Released into the public domain with absolutely no warranty, explicit, implied or otherwise | |
// Use at your own risk!! | |
// If you do use this code please drop an email to code at stut dot net and let me know why ;) | |
// Patches, comments, suggestions, questions, etc are welcomed | |
// The MODEL_CACHE_DIR is where the table definitions get cached. This can be anywhere you like, defaults to cache/ |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define rand3() ((int)(rand() % 3)+1) | |
void seedrand() | |
{ | |
unsigned int randval; | |
FILE *f; |
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 | |
$first_names = array( | |
'Abigail', 'Alice', 'Amber', 'Amelia', 'Amy', 'Ava', 'Brooke', | |
'Caitlin', 'Charlotte', 'Chloe', 'Daisy', 'Elizabeth', 'Ella', 'Ellie', | |
'Emily', 'Emma', 'Erin', 'Eva', 'Evie', 'Freya', 'Grace', 'Hannah', | |
'Holly', 'Imogen', 'Isabel', 'Isabella', 'Isabelle', 'Isla', 'Jasmine', | |
'Jessica', 'Katie', 'Keira', 'Leah', 'Lilly', 'Lily', 'Lola', 'Lucy', | |
'Matilda', 'Megan', 'Mia', 'Millie', 'Molly', 'Olivia', 'Phoebe', | |
'Poppy', 'Ruby', 'Scarlett', 'Sophia', 'Sophie', 'Summer', 'Adam', | |
'Alex', 'Alexander', 'Alfie', 'Archie', 'Benjamin', 'Callum', |
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 | |
// Logger interface. | |
interface iLogger | |
{ | |
public function __construct(); | |
public function write($str); | |
} |
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
# -*- coding: utf-8 -*- | |
""" | |
Dice | |
Part of rollnmove | |
Copyright © 2011-2012 Stuart Dallas | |
""" | |
import random |
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
#!/usr/bin/env php | |
<?php | |
// The email address notifications should be sent to | |
$____email_address = '[email protected]'; | |
// This array maps incoming emails to scripts | |
$____processor_map = array( | |
// For the ta_follows user there's a separate script for each notification type | |
'ta_follows' => array( | |
'is_following' => dirname(__FILE__).'/ta_follows/new_follower.php', |
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 IsMobile() | |
{ | |
$retval = false; | |
$user_agent = $_SERVER['HTTP_USER_AGENT']; | |
$accept = $_SERVER['HTTP_ACCEPT']; | |
if (preg_match('/ipod/i', $user_agent) | |
|| |