Skip to content

Instantly share code, notes, and snippets.

View prestarocket's full-sized avatar

Adonis Karavokyros prestarocket

View GitHub Profile
@prestarocket
prestarocket / prestashop-blank-module.php
Created March 9, 2012 14:50
Prestashop : base module
<?php
/*
www.prestarocket.com
Twitter : @prestarocket
*/
if ( !defined( '_PS_VERSION_' ) )
exit;
class MyModule extends Module
{
public function __construct()
@prestarocket
prestarocket / snippet.js
Created March 8, 2012 23:13 — forked from necolas/snippet.js
Optimised async loading of cross-domain scripts
/*
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/
* Better handling of scripts without supplied ids.
*
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function.
*/
(function(doc, script) {
var js,
fjs = doc.getElementsByTagName(script)[0],
@prestarocket
prestarocket / normalized.html
Created January 19, 2012 11:11 — forked from scottkellum/normalized.html
pixel normalization
<!doctype html>
<html>
<head>
<!-- Encoding -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"></meta>
@prestarocket
prestarocket / wordpress-last-class.php
Created July 11, 2011 08:57
wordpress : add last class to menu item
/* Add last_item class to last li in wp_nav_menu lists*/
function add_last_item_class($strHTML) {
$intPos = strripos($strHTML,'menu-item');
printf("%s last_item %s",
substr($strHTML,0,$intPos),
substr($strHTML,$intPos,strlen($strHTML))
);
}
add_filter('wp_nav_menu','add_last_item_class');
@prestarocket
prestarocket / prestashop gitignore
Created July 8, 2011 00:43
Prestashop gitignore
# This is a template .gitignore file for git-managed Prestashop projects. Inspired by micahwalter wordpress gitignore
#Ignore ds_store
*.DS_Store
# Ignore everything in the root except modules, themes and override.
/*
!modules/
!themes/
@prestarocket
prestarocket / .gitignore
Created July 7, 2011 15:53 — forked from micahwalter/.gitignore
wordpress .gitignore
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your