pear channel-discover zend.googlecode.com/svn
pear install zend/zend
pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
pear install phpunit/PHPUnit
<?php | |
/* | |
* "Interleave" two strings in every possible way. | |
* interleave('ABC', 'DE') = | |
* ABCDE ABDCE ABDEC ADBCE ADBEC ADEBC DABCE DABEC DAEBC DEABC | |
* | |
* Nothing real special here, just thought it was an interesting | |
* problem that gets annoying for humans but after some thought is | |
* quite simple to a programmer and a computer. |
<?php | |
/** | |
* Similar to elements.php, but with all words in a dictionary. | |
*/ | |
require_once('elements.php'); | |
$els = getElements(); | |
$mostMatchesLen = 0; | |
$mostMatches = ''; |
" This attempts to replicate Powerline with the solarized256 colorscheme and the default theme. | |
" It was generated from the Powerline colorscheme struct and a script attempting to match powerline | |
" items to the Airline layout. | |
<?php | |
// TODO filename bold - accent? | |
$json = file_get_contents('solarized256.vimv'); | |
$json = str_replace("'", '"', $json); | |
$powerlinedata = json_decode($json, true); | |
$palette = array(); |
# -*- Mode: Python -*- | |
# OpenSSL wrapper | |
# https://github.com/joric/brutus/blob/master/ecdsa_ssl.py | |
import ctypes | |
import ctypes.util | |
ssl = ctypes.cdll.LoadLibrary (ctypes.util.find_library ('ssl') or 'libeay32') |
<?php | |
// configure the ECC lib | |
if (!defined('USE_EXT')) { | |
if (extension_loaded('gmp')) { | |
define('USE_EXT', 'GMP'); | |
} else if(extension_loaded('bcmath')) { | |
define('USE_EXT', 'BCMATH'); | |
} else { | |
die('GMP or bcmath required. (GMP is faster).'); | |
} |
<html> | |
<head> | |
<title>Color Guesser</title> | |
<script type="application/javascript"> | |
var colors = ['maroon','red','orange','yellow','olive','purple','fuchsia','lime','green','navy','blue','aqua','teal','black','silver','gray']; | |
var bit = 1; | |
var total = 0; |
#!/bin/bash | |
# the number of files, including any duplicates, is: ls -l | wc -l | |
sha256sum * | cut -d ' ' -f 1 | sort -u | wc -l |
The actual code (bash script) is very specific to what I was doing, but I'm putting it here so I can find it if I want to do something similar again. Or maybe it will help someone else!
<?php | |
ini_set('date.default_timezone', 'America/Denver'); | |
?> | |
<!DOCTYPE NETSCAPE-Bookmark-file-1> | |
<!-- This is an automatically generated file. | |
It will be read and overwritten. | |
DO NOT EDIT! --> | |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> | |
<TITLE>Bookmarks</TITLE> | |
<H1>Bookmarks</H1> |