Skip to content

Instantly share code, notes, and snippets.

View prestancedesign's full-sized avatar

Michael Salihi prestancedesign

View GitHub Profile
prestancedesign / clean-prestashop-db.sql
Last active July 3, 2018 03:45 — forked from julienbourdeau/clean-prestashop-db.sql
Clean PrestaShop database - Drop old and unless data
# Delete all logs
TRUNCATE ps_log;
# Delete old connection data (only used for stats)
# change 2016-02-01 00:00:00 according to you needs
DELETE c, cs
FROM ps_connections c
LEFT JOIN ps_connections_source cs ON (c.id_connections = cs.id_connections)
WHERE c.date_add < '2016-02-01 00:00:00';
prestancedesign / bitbucket-pipelines.yml
Created July 10, 2018 08:41 — forked from exileed/bitbucket-pipelines.yml
Bitbucket pipelines test + Ansible deploy script
image: php:7.1-fpm
- step:
- composer
# Update dependencies
- apt-get update
# Install dependencies
prestancedesign / re-frame-click-counter
Last active December 8, 2020 14:01 — forked from saskali/re-frame-click-counter
Re-frame simple click counter
(ns simple.core
(:require [reagent.dom :as reagent]
[re-frame.core :as rf]))
;; -- Domino 1 - Event Dispatch -----------------------------------------------
(defn dispatch-click
(rf/dispatch [:click-count])) ;; send event `:click-count`
prestancedesign / reagent-color-sorting
Last active December 8, 2020 14:02 — forked from saskali/reagent-color-sorting
Re-frame color example
(ns color-sorting.core
(:require [reagent.core :as reagent]
[reagent.dom :as dom]))
(def colors ["blue" "yellow" "green" "purple" "red"])
(def color-row (reagent/atom ["blue" "yellow" "green"]))
(def sorted-color-row (reagent.ratom/reaction (sort @color-row)))
(defn square [color]
(ns simple.core
(:require [reagent.dom :as dom]
[re-frame.core :as rf]
[clojure.string :as str]))
;; A detailed walk-through of this source code is provied in the docs:
;; -- Domino 1 - Event Dispatch -----------------------------------------------
prestancedesign / re-playground-readme.cljs
Last active December 8, 2020 14:04 — forked from daiyi/re-playground-readme.cljs
Re-frame playground
(ns instructions.core
(:require [reagent.dom :as dom]
[re-frame.core :as re-frame]))
(defn info []
[:div {:style {:max-width 500}}
[:h1 "re-playground"]
[:p "code is livereloaded.
this right-hand panel has the id 'app'.
to render reagent into this panel, target this element with "
prestancedesign /
Last active December 8, 2020 14:06
A TODO cli with Clojure (Babashka)
prestancedesign / digitalocean-ping.clj
Last active December 8, 2020 14:33
DigitalOcean datacenter ping with Babashka (Clojure)
#!/usr/bin/env bb
(require '[babashka.curl :as curl]
'[ :as shell]
'[clojure.string :as str])
(def url "")
(def get-endpoints
(let [{:keys [body]} (curl/get url)]
// Afficher les boites de liens à gauche
settings.hintAlign = "left";
// Se déplacer avec <C-j> et <C-k> dans Omnibox
cmap('<Ctrl-j>', '<Tab>');
cmap('<Ctrl-k>', '<Shift-Tab>');
// Différentes règles afin de retrouver quelques comportements de base de Vimium
map('u', 'e');
mapkey('p', "Open the clipboard's URL in the current tab", function() {
prestancedesign /
Created January 13, 2023 11:30
HTMX + Clojure

Run the app:

clj -M -m htmx