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 | |
$currency_symbols = array( | |
'AED' => 'د.إ', // ? | |
'AFN' => 'Af', | |
'ALL' => 'Lek', | |
'AMD' => '', | |
'ANG' => 'ƒ', | |
'AOA' => 'Kz', // ? | |
'ARS' => '$', | |
'AUD' => '$', |
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 | |
/** | |
* Get Drupal latest version | |
*/ | |
$latest = NULL; | |
$url = 'http://updates.drupal.org/release-history/drupal/7.x'; | |
$context = stream_context_create(array( | |
'http' => 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 | |
/** | |
* Get Drupal 7 current version | |
*/ | |
$version = NULL; | |
$version_file = 'includes/bootstrap.inc'; | |
// Path to installation | |
$install_path = '/home/user/website.com/public_html'; |
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 | |
// Dan Gibbs | |
// Clear MODx Revolution Cache (2.1 and later) | |
// Path to MODx Core Directory | |
define("MODX_CORE_PATH", "../core/"); | |
define("MODX_CONFIG_KEY", "config"); | |
// Include MODx main class | |
include(MODX_CORE_PATH . "model/modx/modx.class.php"); |
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 | |
/* | |
* Clear (refresh) MODx Cache from external PHP Script | |
* | |
* MODx Revolution (2.0.7-pl) | |
* Daniel Gibbs | |
*/ | |
// Path to MODx Core Directory | |
define("MODX_CORE_PATH", "../core/"); |
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 | |
$code = array(); | |
$code['0'] = 'Connection Failed. Please configure Varnish to accept HTTP purge requests.'; | |
$code['100'] = 'Continue'; | |
$code['101'] = 'Switching Protocols'; | |
$code['102'] = 'Processing'; | |
$code['200'] = 'OK'; | |
$code['201'] = 'Created'; | |
$code['202'] = 'Accepted'; |
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
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> | |
<ShortName>YouTube</ShortName> | |
<Description>YouTube Search</Description> | |
<InputEncoding>UTF-8</InputEncoding> | |
<Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAD///8AEiP//xIj//8SI///EyP//xIj//8SI///EiP//xIj//8SI///EyP//xIj//8SI///EiP//xIj//////8AEiP//wAc7v8AHO7/AB3v/wAc7v8AHO7/ABzu/wAc7v8AHO7/ABzu/wAd7/8AHe//ABzu/wAc7/8AHe//EiP//xIj//8SI////////09V//+6uv////////////9PVf//z87///////+ysv//EiP//5ub////////0tH//xIj//8SI///EiP///////9PVf///////xIj////////T1X///////8SI////////5qZ////////EiP//xIj//8TI///EiP//xIj////////T1X///////8TI////////09V////////EiP///////+amf/////////////S0f//EiP//xIj//8SI////////09V////////EiL///////9PVf////////////+6uv//EiP//7q6///v8P//0tH//xIj//8SI///EyP///////8SI///EiP//xIj//8SI///EiP///////8SI///EiP//xIj//8SI///EiP//xIj//8SI///EiP//////////////////xIj//8SI///EiP//xMj////////EiP//xIj//8SI///EiP//xIj//8SI///EiP//9nZ//8SI///EiP//xMj//8SI |
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
""" | |
Quick Linux DNS IP Updater Python script for FreeDNS (freedns.afraid.org) | |
Author: Daniel Gibbs | |
Version: 0.2 | |
URL: http://www.danielgibbs.net/ | |
** Must set update_key and make sure that ip_file is read and writable | |
This program is free software; you can redistribute it and/or modify it under |
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/python | |
import gtk | |
try: | |
import egg.trayicon | |
except: | |
print "You need to install the python-eggtrayicon package" | |
class EggTrayIcon: | |
def __init__(self): |
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 'app/Mage.php'; | |
Mage::app(); | |
$products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*'); | |
foreach ($products as $product) { | |
if (!$product->hasImage()) continue; | |
if (!$product->hasSmallImage()) $product->setSmallImage($product->getImage()); | |
if (!$product->hasThumbnail()) $product->setThumbnail($product->getImage()); |
OlderNewer