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
// ==UserScript== | |
// @name EnableGoogleWebHistory | |
// @author mallowlabs | |
// @namespace http://mallowlabs.s206.xrea.com/ | |
// @version 0.0.2 | |
// @license public domain | |
// @description : Enable Google Web History | |
// @published 2007-01-05 | |
// @modified 2006-01-05 | |
// @include * |
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
(function($){ | |
/* hoverIntent by Brian Cherne */ | |
$.fn.hoverIntent = function(f,g) { | |
// default configuration options | |
var cfg = { | |
sensitivity: 7, | |
interval: 100, | |
timeout: 0 | |
}; | |
// override configuration options with user supplied object |
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
<script type="text/javascript" language="javascript"> | |
// <![CDATA[ | |
Effect.divSwap = function(element,container){ | |
var div = document.getElementById(container); | |
var nodeList = div.childNodes; | |
var queue = Effect.Queues.get('menuScope'); | |
if(queue.toArray().length<1){ | |
if(Element.visible(element)==false){ | |
for(i=0;i<nodeList.length;i++){ | |
if(nodeList.item(i).nodeName=="DIV" && nodeList.item(i).id!=element){ |
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(! class_exists('MemCache', false)) | |
{ | |
class MemCache | |
{ | |
//Add an item to the server | |
function add ( $key , $var , $flag = null , $expire =null ) | |
{ | |
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
// place your text within the variable $text | |
// use this code to extract email addresses from a text | |
$text = ' email@domain.com '; | |
function parseTextForEmail($text) { | |
$email = array(); | |
$invalid_email = array(); | |
$text = ereg_replace("[^A-Za-z._0-9@ ]"," ",$text); | |
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 | |
############################################################### | |
# Email Extractor 1.0 | |
############################################################### | |
# Visit http://www.zubrag.com/scripts/ for updates | |
############################################################### | |
$the_url = isset($_REQUEST['url']) ? htmlspecialchars($_REQUEST['url']) : ''; |
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 Gravatar | |
* | |
* From Gravatar Help: | |
* "A gravatar is a dynamic image resource that is requested from our server. The request | |
* URL is presented here, broken into its segments." | |
* Source: | |
* http://site.gravatar.com/site/implement |
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
Simple GD examples: | |
Resize an image | |
<?php | |
// Set the path to the image to resize | |
$input_image = "House.jpg"; | |
// Get the size of the original image into an array | |
$size = getimagesize( $input_image ); | |
// Set the new width of the image |
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 | |
// SHA-256, SHA-512 | |
$var = 'lorem ipsum'; | |
$hash256=hash('sha256', $var); | |
$hash512=hash('sha512', $var); | |
echo $hash256 $hash512; | |
?> |
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 | |
header('content-type: image/jpeg'); | |
$watermark = imagecreatefrompng('watermark.png'); | |
$watermark_width = imagesx($watermark); | |
$watermark_height = imagesy($watermark); | |
$image = imagecreatetruecolor($watermark_width, $watermark_height); | |
$image = imagecreatefromjpeg($_GET['src']); | |
$size = getimagesize($_GET['src']); |
OlderNewer