Skip to content

Instantly share code, notes, and snippets.

@cgarnier
cgarnier / SFR CGNAT.md
Created April 1, 2023 08:37
Sortir du CGNAT ou de l'ipv6 SFR et obtenir un IPV4 NATable

La démarche a suivre pour obtenir une address wan ipv4 public NATable:

  • 1023 > technique
    • "blabla mes server et camera marche plus..." mot clé: rétractation ou résiliation
    • transfer service résiliation
  • service résiliation:
    • confirmer la demande de résiliation pour le faire passer en mode rétention de client
    • "blabla j ai des camera ca marche plus" mot clé: camera
    • transfer service technique niveau 2
  • service technique niveau 2: Demander un rollback ipv4
04bfa926d9e6478baca4e10ca21b41f46c86781b794765e95dd33514c88f10b05d5088df4d12ed7f834efcf0de1d99199bd4874e0acfac8692650870b0600af0b4;vesparny
@cgarnier
cgarnier / MailhogTestHelper.php
Last active May 17, 2022 10:24 — forked from v-jacob/MailTestHelper.php
Mailhog PHPUnit Test Helper
<?php
use GuzzleHttp\Client;
trait MailTestHelper
{
/**
* @var \GuzzleHttp\Client
*/
protected $mailService;
@cgarnier
cgarnier / TweenMax dashed svg path animation.js
Last active October 5, 2016 09:52
Animate a svg path with TweenMax
/**
* Animate a dashed svg path
* @param el DOM path element
* @param width Width of the dashes
* @param space Space between the dashes
*/
animateLine (el, width, space) {
let total = Math.floor(el.getTotalLength())
let segment = [width, space]
@cgarnier
cgarnier / prepare-commit-msg
Last active June 5, 2017 05:36 — forked from airblade/prepare-commit-msg
Git prepare-commit-msg hook to extract issue number from branch name and append to commit message.
#!/bin/bash
# Adds reference to GitHub issue if available in branch name.
# The issue number should be at the end of the branch name, following
# a hyphen.
# Only proceed if no second parameter is given to the script.
if [ x = x${2} ]; then
branch=$(git symbolic-ref --short HEAD)
if [[ $branch =~ ^([^/]+)/([A-Z]+\-[0-9]+) ]]; then
@cgarnier
cgarnier / post-receive
Last active June 19, 2016 17:47 — forked from edmondburnett/gist:40e7db34416fdc734846
Push-to-Deploy node project
#!/usr/bin/env python
# post-receive hook for git-based deployments
import sys
import os
from subprocess import call
# configuration
deploy_to_path = os.path.realpath('./deploy_dir')
deploy_branch = 'master'
@cgarnier
cgarnier / node6_on_raspbian.md
Last active May 1, 2019 20:26
Install node 6 on raspbian
@cgarnier
cgarnier / Gitlab docker-compose.yml
Created June 13, 2016 20:48
A docker compose file for gitlab server
postgresql:
restart: always
image: sameersbn/postgresql:9.4-10
environment:
- DB_USER=gitlab
- DB_PASS=***changeme***
- DB_NAME=gitlabhq_production
volumes:
- /srv/docker/gitlab/postgresql:/var/lib/postgresql
gitlab:
@cgarnier
cgarnier / deploy.sh
Created March 6, 2016 13:17
Deploy a git project with gitlab ci.
#!/bin/bash
# Install ssh-agent if not already installed, it is required by Docker.
# (change apt-get to yum if you use a CentOS-based image)
which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )
# Run ssh-agent (inside the build environment)
eval $(ssh-agent -s)
@cgarnier
cgarnier / docker.domain.tld
Created December 5, 2015 10:16
nginx proxy conf for docker registry
server {
listen 443;
server_name docker.domain.tld;
client_max_body_size 1G;
ssl on;
ssl_certificate /path/to/certs/registry.bundle.crt;
ssl_certificate_key /path/to/certs/registry.key;
location / {