Skip to content

Instantly share code, notes, and snippets.

View prestancedesign's full-sized avatar

Michael Salihi prestancedesign

View GitHub Profile
@CWSpear
CWSpear / ajaxify-html5.js
Created July 8, 2012 05:16 — forked from balupton/README.md
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo
// https://gist.github.com/3069522
;(function($, window, document, undefined) {
// Prepare our Variables
var History = window.History;
// Check to see if History.js is enabled for our Browser
if (!History.enabled) {
return false;
}
@prestarocket
prestarocket / Media.php
Created January 26, 2015 21:08
Override Media.php to keep some files in header
<?php
Class Media extends MediaCore
{
public static function deferScript($matches)
{
if (!is_array($matches))
return false;
$inline = '';
@xbb
xbb / prestashop-autocompletion.php
Created September 12, 2011 10:12
Prestashop autocompletion
<?php
class AbstractLogger extends AbstractLoggerCore {}
class Address extends AddressCore {}
class AddressFormat extends AddressFormatCore {}
class AdminTab extends AdminTabCore {}
class Alias extends AliasCore {}
class Attachment extends AttachmentCore {}
class Attribute extends AttributeCore {}
class AttributeGroup extends AttributeGroupCore {}
@michaelhjulskov
michaelhjulskov / FrontController.php
Last active May 21, 2018 14:04
Add Canonical tag's to Prestashop
<?php
// Feel free to copy IF you create a href link that point to http://www.dyrefoder.dk from your google indexed website
// Thank you
// Michael Hjulskov
// www.dyrefoder.dk
class FrontController extends FrontControllerCore
{
public function init()
{
@stesie
stesie / php-doc.el
Last active April 24, 2019 19:19
php doc block generator/extractor for emacs
;;; php-doc.el --- doc block generator/extractor for php
;; Copyright (C) 2010, 2013 Stefan Siegl <stesie@brokenpipe.de>
;; Maintainer: Stefan Siegl <stesie@brokenpipe.de>
;; Author: Stefan Siegl <stesie@brokenpipe.de>
;; Keywords: php docblock
;; Created: 2010
;; Modified: 2013-09-14
;; X-URL: https://gist.github.com/stesie
@hereswhatidid
hereswhatidid / Media.php
Last active December 11, 2019 08:50
PrestaShop Media class override to allow for forcing some inline JavaScripts to remain inline.
<?php
Class Media extends MediaCore
{
public static function deferScript($matches)
{
if (!is_array($matches))
return false;
$inline = '';
if (isset($matches[0]))
@borkdude
borkdude / sci_google_cloud.js
Last active March 1, 2020 13:21
Google cloud function running sci
const { evalString } = require("@borkdude/sci");
let printlnArgs = [];
function println(...args) {
printlnArgs.push(args.map(arg => arg.toString()).join(" "));
}
exports.evalClojureExpr = (req, res) => {
const { text } = req.body;

Upload component

Context

Based heavily on [s3-beam][1], but uses re-frame events/subs to get the job done. The /sign handler is the [s3-beam][1] handler (near verbatim).

For background on (ui.core/component "...") see https://opensourcery.co.za/2017/02/12/using-semantic-ui-react-with-re-frame/

ui.ajax is just thin wrappers and/or aliases around plumbing from ajax.core from cljs-http

<?php
/**
* check sendtoafriend module vulnerability
*
* run it in terminal
*
* @link https://blog.seb7.fr/a/faille-sécurité-prestashop-module-envoyer-a-un-ami
* @author seb7.fr
*/
#!/usr/bin/env bb
(require '[clojure.java.shell :refer [sh]])
(defn exit [error]
(println error)
(System/exit 1))
(defn open-folder [folder]
(let [folder (some-> folder (io/file))]
(when (nil? folder)