A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
<?xml version="1.0"?> | |
<!-- | |
[Your site name] XML overrides | |
--> | |
<layout version="0.1.0"> | |
<!-- updating top.links to add class names --> | |
<!-- Section 1: Removing Current Links --> | |
<default> | |
<reference name="top.links"> | |
<!-- Removes 'My Account' link --> |
NOTE: This document is OLD - and most of the tips here are probably outdated, since newer versions of Javascript have been | |
released over the years - with newer optimizations and more emphasis on optimizing newly supported syntax. | |
// Array literal (= []) is faster than Array constructor (new Array()) | |
// http://jsperf.com/new-array-vs-literal/15 | |
var array = []; | |
// Object literal (={}) is faster than Object constructor (new Object()) | |
// http://jsperf.com/new-array-vs-literal/26 |
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
<?php | |
require_once ("app/Mage.php"); | |
class TradeOrders | |
{ | |
private static $headers = array('ORDER_ID', 'EMAIL', 'LAST_NAME', 'FIRST_NAME', 'PRODUCT_ID', 'PRODUCT_NAME'); | |
public static function get($from, $to) { | |
// Fetch all UK Trade orders within specified date range |
<?php | |
header('Content-type: text/xml'); | |
/* | |
Runs from a directory containing files to provide an | |
RSS 2.0 feed that contains the list and modification times for all the | |
files. | |
*/ | |
$feedName = "My Audio Feed"; | |
$feedDesc = "Feed for the my audio files in some server folder"; |
login url | |
<?php echo Mage::getUrl('customer/account/login'); ?> | |
logout url | |
<?php echo Mage::getUrl('customer/account/logout'); ?> | |
My Account url | |
<?php echo Mage::getUrl('customer/account'); ?> | |
Register url |
A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
$StartDate = @strtotime("Jan 2003"); | |
$StopDate = @strtotime("Apr 2004"); | |
/** | |
* Gets list of months between two dates | |
* @param int $start Unix timestamp | |
* @param int $end Unix timestamp | |
* @return array | |
*/ | |
function echoDate( $start, $end ){ |
<?php | |
header('Content-Type: image/jpeg'); | |
echo file_get_contents('http://[FOSCAM_IP]:[PORT]/snapshot.cgi?user=[USERNAME]&pwd=[PASSWORD]'); |
#!/bin/bash | |
BASE="/mnt/eventcam/" | |
COMPRESS=0 | |
RERUN=0 | |
UPLOAD=1 | |
TODAY=`date +%Y%m%d` | |
# Move all jpgs in to per date folder for processing | |
for file in `find $BASE -maxdepth 1 -name '*.jpg' -type f -print`; do | |
newfilename=`echo $file | awk -F '-' '{print $2$3}'` | |
date=`echo $newfilename | cut -c 1-8` |