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
<html> | |
<head> | |
<title></title> | |
<style type="text/css"> | |
div.special { | |
border: 2px solid #FFCCCC; | |
width: 200px; | |
height: 400px; | |
position: absolute; |
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
DELIMITER ;; | |
/*!50003 CREATE*/ /*!50020 DEFINER=`foobar`@`localhost`*/ /*!50003 FUNCTION `distance`( lat1 DOUBLE, lon1 DOUBLE, lat2 DOUBLE, lon2 DOUBLE ) RETURNS DOUBLE | |
DETERMINISTIC | |
BEGIN | |
RETURN 3956 * 2 * ASIN(SQRT(POWER(SIN((lat1 - lat2) * pi()/180 / 2), 2) + COS(lat1 * pi()/180) * COS(lat2 * pi()/180) * POWER(SIN((lon1 - lon2) * pi()/180 / 2), 2))); | |
END */;; |
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
#!/bin/bash | |
# sonia 16-nov-05 | |
# backup each mysql db into a different file, rather than one big file | |
# as with --all-databases - will make restores easier | |
OUTPUTDIR="/root/db_backups-2013-06-27" | |
MYSQLDUMP="/usr/bin/mysqldump" | |
MYSQL="/usr/bin/mysql" | |
# clean up any old backups - save space |
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
#!/bin/bash | |
POLLING_INTERVAL=2 | |
CONTENT_LENGTH=0 | |
URL=$1 | |
USER=$2 | |
PASS=$3 | |
if [ -z "$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
<ul class="pagination"> | |
<?php | |
echo '<li>'.$this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled')).'</li>'; | |
echo $this->Paginator->numbers(array('currentTag' => 'span', 'tag' => 'li', 'separator' => '')); | |
echo '<li>'.$this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled')).'</li>'; | |
?> | |
</ul> |
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
/** | |
* Parse out the Pipelines created in a Demandware Pipeline File | |
* | |
* This script requires the node-xml2js library, npm install npm install xml2js | |
* | |
* To call: node index.js /some/path/to/the/desired/file/pipelines.xml | |
* | |
* @param File Name, the first and only argument to this script is a path to the file to parse | |
*/ |
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/ruby | |
# Parameters for doing the copy | |
#destCart = ARGV[0] | |
#baseFile = ARGV[1] | |
destCart = "./cartridges/some_cartridge" | |
baseFile = ARGV[0] | |
# Get the index of the cartridge directory so we can replace the begining | |
# with our desitnation cartridge |
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
package nettail; | |
import java.io.BufferedReader; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.io.UnsupportedEncodingException; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; |
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://robdodson.me/javascript-design-patterns-singleton/ | |
* http://addyosmani.com/resources/essentialjsdesignpatterns/book/#singletonpatternjavascript | |
*/ | |
var Configuration = (function () { | |
// Instance stores a reference to the Singleton | |
var instance; |
OlderNewer