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 | |
/** | |
* Array to Text Table Generation Class | |
* | |
* @author Tony Landis <[email protected]> | |
* @link http://www.tonylandis.com/ | |
* @copyright Copyright (C) 2006-2009 Tony Landis | |
* @license http://www.opensource.org/licenses/bsd-license.php | |
*/ | |
class ArrayToTextTable |
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
require 'rubygems' | |
require 'sinatra' | |
require 'redis' | |
# To use, simply start your Redis server and boot this | |
# example app with: | |
# ruby example_note_keeping_app.rb | |
# | |
# Point your browser to http://localhost:4567 and enjoy! | |
# |
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 Email($name, $from, $to, $subject, $message, $bcc = null, $attachments = null) | |
{ | |
ini_set('SMTP', 'localhost'); | |
ini_set('sendmail_from', $from); | |
$name = filter_var($name, FILTER_SANITIZE_STRING); | |
$from = filter_var($from, FILTER_SANITIZE_EMAIL); | |
$subject = filter_var($subject, FILTER_SANITIZE_STRING); |
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 DB($query) | |
{ | |
static $db = null; | |
static $result = array(); | |
if (is_file($query) === true) | |
{ | |
$db = new PDO('sqlite:' . $query, null, null, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING)); |
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 | |
/* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
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 is UNIX - Simple preforking echo server in PHP | |
************************************************** | |
The code here is related to: | |
http://tomayko.com/writings/unicorn-is-unix | |
http://jacobian.org/writing/python-is-unix/ | |
http://plasmasturm.org/log/547/ - perl is unix |
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
# Postgres install on ubuntu | |
sudo apt-get install postgresql | |
# Log in with | |
sudo -u postgres psql postgres | |
# change password by issuing | |
\password postgres | |
# create databases with |
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 | |
$g=$_GET;$c=@$g['c']?$g['c']:'Home'; | |
if(!@include"c/$c.php")die('fail'); | |
$m=method_exists($c,$m=@$g['m'])?$m:'index'; | |
$o=new$c();$o->$m($g); |
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
/* | |
smtpd.js is SMTP server written for node.js | |
MIT License | |
*/ | |
var tcp = require('tcp'); | |
var sys = require('sys'); |
OlderNewer