Skip to content

Instantly share code, notes, and snippets.

Avatar

Ollie McFarlane franksmule

View GitHub Profile
@franksmule
franksmule / permissions.sh
Created Apr 12, 2014
Prestashop Permissions Script
View permissions.sh
chmod 755 -R config
chmod 755 -R tools/smarty/compile
chmod 755 -R tools/smarty/cache
chmod 755 -R tools/smarty_v2/compile
chmod 755 -R tools/smarty_v2/cache
chmod 755 -R sitemap.xml
chmod 755 -R log
chmod 755 -R img
chmod 755 -R mails
chmod 755 -R modules
@franksmule
franksmule / package.json
Last active Jul 6, 2017
Package.json for the gulp.js file - Tutorial -> http://omcfarlane.co.uk/install-gulp-js-windows/
View package.json
{
"name": "MyProject",
"version": "1.0.0",
"dependencies": {
"gulp": "*",
"gulp-ruby-sass": "*",
"gulp-util": "*",
"gulp-rename": "*",
"map-stream": "*",
"gulp-livereload": "*",
@franksmule
franksmule / gulpfile.js
Last active Aug 8, 2017
gulp.js that does SASS, JS Concatenation Watching - Tutorial -> http://omcfarlane.co.uk/install-gulp-js-windows/
View gulpfile.js
//*********** IMPORTS *****************
var gulp = require('gulp');
var sass = require('gulp-ruby-sass');
var gutil = require('gulp-util');
var rename = require("gulp-rename");
var map = require("map-stream");
var livereload = require("gulp-livereload");
var concat = require("gulp-concat");
var uglify = require('gulp-uglify');
var watch = require('gulp-watch');
@franksmule
franksmule / handlerbars_helper.js
Last active Jan 2, 2016
Handlebars.js get element from array
View handlerbars_helper.js
getElement: function(array, key) {
if(array != undefined && array != null && array.length > 0 && array[key] != undefined){
return array[key].toString();
}
return "";
}
@franksmule
franksmule / background-loader.js
Last active Jan 1, 2016
Fade in high resolution image, where body is initially set to low resolution image.
View background-loader.js
jQuery(function ($) {
var newpic = new Image();
newpic.onload = function()
{
var $div = $('<div id="temp-background"/>').css({
'background-image': 'url(low-resolution-image.jpg)',
'position': 'absolute',
'height' :'100%',
'width' :'100%',
'z-index' :'-1',
@franksmule
franksmule / config.rb
Created Dec 4, 2013
Config file for Cake with Prepros, change the css_dir relativeness to what suites. Also change output filename.
View config.rb
css_dir = "../../www/app/View/Themed/Admin/webroot/css/"
sass_dir = "/"
output_style = :compressed
require 'fileutils'
on_stylesheet_saved do |file|
if File.exists?(file)
puts "Moving: #{file}"
FileUtils.mv(file,File.dirname(file) + "/admin.min.css")
You can’t perform that action at this time.