Skip to content

Instantly share code, notes, and snippets.

@franksmule
franksmule / permissions.sh
Created April 12, 2014 15:57
Prestashop Permissions Script
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 December 10, 2020 07:14
Package.json for the gulp.js file - Tutorial -> http://omcfarlane.co.uk/install-gulp-js-windows/
{
"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 August 8, 2017 20:30
gulp.js that does SASS, JS Concatenation Watching - Tutorial -> http://omcfarlane.co.uk/install-gulp-js-windows/
//*********** 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 January 2, 2016 23:09
Handlebars.js get element from array
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 January 1, 2016 18:59
Fade in high resolution image, where body is initially set to low resolution image.
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 December 4, 2013 12:04
Config file for Cake with Prepros, change the css_dir relativeness to what suites. Also change output filename.
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")