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
/* | |
AutoHotkey Script | |
Use this script to map the Apple command key to the Alt Key and vice-versa. | |
This also fixes the alt-tab issues. | |
*/ | |
; We don't need to see a tray icon | |
#NoTrayIcon | |
; Peform the map |
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 | |
/////////////////////////////////////////////////////////////////////////////// | |
// Generate an 8 character long random string | |
/////////////////////////////////////////////////////////////////////////////// | |
$chars = array('0', '1', '2', '3', '4', '5', '6', 'A', 'B', 'C', 'D', 'E', 'F'); | |
$asset_key = ''; | |
for ($x = 0; $x < 8; $x++) | |
$asset_key .= $chars[rand(0, 13)]; |
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
#!/usr/bin/perl -w | |
# rename | |
$op = shift or die "Usage: rename expr [files]n"; | |
chomp (@ARGV = <STDIN>) unless @ARGV; | |
for (@ARGV) { | |
$was = $_; | |
eval $op; | |
die $@ if $@; | |
rename ($was,$_) unless $was eq $_; |
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
/* | |
Title: ImagesObserver | |
About: Author | |
Joe Gornick | |
*/ | |
/* | |
Class: ImagesObserver | |
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 | |
if (sizeof($_POST) > 0) { | |
$return_code = -1; | |
// Command to generate a new htpasswd | |
$command = 'htpasswd -nb ' . $_POST['new_username'] . ' ' . $_POST['new_password']; | |
// Execute command | |
exec($command, $result); | |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
<meta http-equiv="Content-Style-Type" content="text/css" /> | |
<meta http-equiv="imagetoolbar" content="no" /> | |
<title>Untitled Document</title> | |
</head> |
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 | |
require_once 'Zend/Loader.php'; | |
Zend_Loader::loadClass('Zend_Http_Client'); | |
Zend_Loader::loadClass('Zend_Gdata'); | |
Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); | |
Zend_Loader::loadClass('Zend_Gdata_Spreadsheets'); | |
class GSpreadsheet | |
{ | |
public $gClient; |
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
CREATE TABLE `provisionlists` ( | |
`provision_list_id` int(11) NOT NULL auto_increment, | |
`provision_list_uuid` binary(16) NOT NULL, | |
`date_created` datetime NOT NULL, | |
PRIMARY KEY (`provision_list_id`) | |
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 | |
DELIMITER // | |
DROP TRIGGER IF EXISTS `events`.`insert_provision_list_uuid` // |
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
http://www.zfforums.com/zend-framework-components-13/core-infrastructure-19/captcha-not-working-right-2577.html | |
## Add Element to Form [php] | |
<?php | |
public $captchaDecorators = array( | |
'ViewHelper' | |
); | |
$this->addElement('captcha', 'foo', array( |
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_Application_Resource_Router extends Zend_Application_Resource_Router | |
{ | |
public $_explicitType = 'router'; | |
protected $_front; | |
protected $_locale; | |
/** | |
* Retrieve router object |
OlderNewer