Skip to content

Instantly share code, notes, and snippets.

View floriancourgey's full-sized avatar
🐔
Supporting French Tech since 2010

Florian Courgey floriancourgey

🐔
Supporting French Tech since 2010
View GitHub Profile
@floriancourgey
floriancourgey / .vimrc
Last active January 26, 2023 00:03
~/.vimrc
" UI
set number " show line number
set ruler " show status bar
set laststatus=2 " always show status bar
syntax on " syntax based on extension
colorscheme slate " theme
set so=7 " set lines to show (when curosr at top or bottom of screen)
" Data
set encoding=utf8 " encoding
@floriancourgey
floriancourgey / modules-my_module-controllers-admin-AdminCustomInvoicesController.php
Created July 7, 2018 01:00
Edit your invoices in Prestashop 1.7 via a Custom Module & Admin Controller
<?php
class AdminCustomInvoicesController extends ModuleAdminController {
public function __construct(){
parent::__construct();
$this->bootstrap = true; // use Bootstrap CSS
$this->table = 'order_invoice'; // SQL table name, will be prefixed with _DB_PREFIX_
$this->identifier = 'id_order_invoice'; // SQL column to be used as primary key
$this->className = 'OrderInvoice'; // PHP class name
$this->allow_export = true; // allow export in CSV, XLS..
@floriancourgey
floriancourgey / workflow.xml
Created March 8, 2019 17:40
AC7 multi pages webApp based on ctx.vars.pageCount
<webApp accessControl="1" appState="0" appType="0" background="nms:backgrounds/survey.png"
builtIn="0" cmsAccount-id="0" created="2019-03-08 17:18:15.727Z" createdBy-id="1052"
defaultDictionary-id="1039" defaultLanguage="en" defaultOrigin-id="0" deliveryMapping-id="3587"
designLanguage="en" endDate="" entitySchema="nms:webApp" folder-id="5530"
folderProcess-id="0" hasHtmlPage="1" id="16392" idCounter="0" internalName="APP4"
isModel="0" label="Keep pageCount" lastModified="2019-03-08 17:18:15.727Z"
library="nms:webAppLogRcp" modelName="newLandingPage" modifiedBy-id="1052"
nature="landingPage" operation-id="0" operator-id="0" optOutBannerMode="0"
originUrlOverride="true" publicationDate="" rendering-id="3582" schema="nms:recipient"
startDate="" startPath="/" state="0" timezone="_inherit_" translationStatus="0"
@floriancourgey
floriancourgey / page1-list.html
Created March 7, 2019 18:11
HTML files for /2018/07/use-the-context-in-web-apps-in-adobe-campaign/
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<title>Starter Template · Bootstrap</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/css/bootstrap.min.css">
</head>
<body style="" class="">
CREATE OR REPLACE FUNCTION public.digest(text, text)
RETURNS bytea
LANGUAGE c
IMMUTABLE STRICT
AS '$libdir/pgcrypto', $function$pg_digest$function$
;
CREATE OR REPLACE FUNCTION public.digest(bytea, text)
RETURNS bytea
LANGUAGE c
IMMUTABLE STRICT
-- Log: Creating table 'CrmBehavioralAggregate'
CREATE TABLE CrmBehavioralAggregate(
iRecipientId INTEGER NOT NULL Default 0,
iRuleId INTEGER NOT NULL Default 0,
iScore INTEGER NOT NULL Default 0,
tsLastEvent TIMESTAMPTZ
);
DROP TABLE IF EXISTS xtksessioninfo;
CREATE TABLE xtksessioninfo(
sImsToken VARCHAR(2000),
sKey VARCHAR(512),
sLogin VARCHAR(64),
sRemoteAddr VARCHAR(50),
sToken VARCHAR(50),
tsExpiration TIMESTAMPTZ
);
@floriancourgey
floriancourgey / setup-elementary.sh
Last active September 5, 2018 05:51
Things to do after installing elementary OS Loki 0.4
# chromium
sudo apt install -y chromium-browser
# dev (php, docker, git, node, bower, electron, composer)
sudo apt install -y \
php php-curl php-mysql \
docker.io \
git \
nodejs npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
@floriancourgey
floriancourgey / config.fish
Created December 19, 2017 15:05
~/.config/fish/config.fish
umask 002
function ll
ls -alh --color=auto $argv
end
if status --is-login
cd ~/allfit
echo "==== GIT ALL FIT ===="
git status -sb
@floriancourgey
floriancourgey / response.json
Created December 13, 2017 17:23
Debug Openstack external storage error
{
"id": 1,
"mountPoint": "/OpenStackObjectStorage2",
"backend": "swift",
"authMechanism": "openstack::openstack",
"backendOptions": {
"bucket": "xx",
"password": "xx",
"region": "xx",
"service_name": "OVH cloud 2",