Skip to content

Instantly share code, notes, and snippets.

View ceer's full-sized avatar

Antoine Caillet ceer

View GitHub Profile
@ceer
ceer / vimeo-modal.html
Last active February 3, 2021 17:44
Full width modal vimeo player
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Vimeo Player Modal Test</title>
<style>
body {
text-align: center;
@ceer
ceer / accept-contact-changes.php
Created September 30, 2020 17:31
OVH API accept contact change request batch routine
<?php
require __DIR__ . '/vendor/autoload.php';
// Doteenv › composer require vlucas/phpdotenv
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();
// OVH API Wrapper › composer require ovh/ovh
use \Ovh\Api;
# serve webp for compatible browser
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{REQUEST_URI} (?i)(.*)(\.jpe?g|\.png)$
RewriteCond %{DOCUMENT_ROOT}%1.webp -f
RewriteRule (?i)(.*)(\.jpe?g|\.png)$ %1\.webp [L,T=image/webp,R]
Header append Vary Accept env=REDIRECT_accept
AddType image/webp .webp
Conventions typographiques Ultrō
--------------------------------
Ultrō avec U majuscule et o macron.
(Sur MacOs et iOS : une pression longue sur le `o` propose le ō avec le raccourci 9)
1er, 2e, 3e
En HTML : 1<sup>er</sup>, 2<sup>e</sup>, 3<sup>e</sup>
@ceer
ceer / post-receive
Last active January 6, 2023 18:04
deploy git branch hook
#!/bin/sh
read oldrev newrev ref
branchname=${ref#refs/heads/}
GITDIR=/path/to/bare.git
TARGET=/path/to/files
git --work-tree=$TARGET --git-dir=$GITDIR checkout --force ${branchname}
@ceer
ceer / vhost-not-hosting-images.conf
Last active October 17, 2017 22:47
Serve prod images on local/stage server
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/.*\.(jpe?g|gif|svg|png)$ [NC]
RewriteRule (.*\.(jpe?g|gif|svg|png))$ https://example.com$1 [R=302,NC,L]
</IfModule>