Skip to content

Instantly share code, notes, and snippets.

@douglasduteil
douglasduteil / data.json
Created August 19, 2014 21:20
AngularMovie datas
[
{
"id":1,
"title":"Avatar",
"releaseYear":"2010",
"poster":"img/avatar.jpg",
"directors":"James Cameron",
"actors":"Sam Worthington, Zoe Saldana, Sigourney Weaver, Stephen Lang, Michelle Rodriguez",
"synopsis":"Sur la lointaine planète de Pandora, Jake Sully, un héros malgré lui, se lance dans une quête de rédemption, de découverte, d'amour inattendu, dont l'issue sera un combat héroïque pour sauver toute une civilisation.",
"rate":"3"
{
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4) Build/MPJ24.139-64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.20 Mobile Safari/537.36",
"lighthouseVersion": "2.0.0",
"generatedTime": "2017-06-11T15:47:28.921Z",
"initialUrl": "https://react-hn.kristoferbaxter.com/",
"url": "https://react-hn.kristoferbaxter.com/",
"audits": {
"is-on-https": {
"score": true,
"displayValue": "",
@douglasduteil
douglasduteil / stats.json
Last active September 29, 2017 11:41
RePeople "yarn run webpack --json > stats.json"
{
"errors": [],
"warnings": [],
"version": "3.6.0",
"hash": "71c562100488c2ac824e",
"time": 2494,
"publicPath": "",
"assetsByChunkName": {
"main": "bundle.js"
},
@douglasduteil
douglasduteil / x1.md
Last active November 3, 2017 16:18
Deployment graph for release crane system
+------------------+
|                  |
|  User Terminal   +----+                                        Travis
|                  |    |
+------------------+    |      +-------------------------+       +------------------+
                        |      |                         |       |                  |
                        +------>  Git Tag "release-plz"  +------>+  API Deployment  |
                        |      |                         |       |                  |
+------------------+    |      +-------------------------+       +-+----------------+
@douglasduteil
douglasduteil / clean-mirror-branches.sh
Last active July 22, 2019 09:41
Delete branches on mirror remote
#!/usr/bin/env bash
set -eu -o pipefail
#
ORIGIN=${1:="origin"}
SUPER=${2:="super"}
#
(async()=>{
const now = Date.now();
const lastPage = 57;
const repository = 31;
const delta = 1000 * 60 * 60 * 24 * 31;
const host = "https://gitlab.factory.social.gouv.fr"
const registry = "https://gitlab.factory.social.gouv.fr/SocialGouv/emjpm/registry"
// 1 mouth
const isTooOld = ({created_at})=>now - Number(new Date(created_at)) > delta
@douglasduteil
douglasduteil / install_kube-resource-report.sh
Created December 18, 2019 12:42
kube-resource-report.dev.fabrique.social.gouv.fr install
$ curl -L https://github.com/hjacobs/kube-resource-report/archive/19.12.0.tar.gz | tar -xz
# create `kube-resource-report` in default project
$ kubectl label namespace kube-resource-report cert=wildcard
$ kubectl config set-context --current --namespace=kube-resource-report
$ helm upgrade \
--install \
--set "image.tag=19.12.0" \
--set "ingress.enabled=true" \
--set "ingress.hosts[0].host=kube-resource-report.dev.fabrique.social.gouv.fr" \
--set "ingress.hosts[0].paths[0]=/" \
@douglasduteil
douglasduteil / .travis.yml
Last active February 22, 2021 13:27 — forked from lukewpatterson/gist:4242707
Here is how I allow Git SSH authentication in Travis CI. I'm using it to connect Travis to my repo organization AngularUI. This trick is a fork. The goal is to encode the RSA private deploy key in the .travis.yml as "-secure: xxxxx.....".
---
language: node_js
node_js:
- '0.10'
branches:
only:
- master
before_script: .travis/before_script.sh
script: echo -e " >>> Do something... \"grunt\" for example\n"
after_success: .travis/after_success.sh
@douglasduteil
douglasduteil / codemirror-mode-regex.css
Last active June 13, 2021 00:43
Here is a start of a regex mode for CodeMirror inspired by [Regex Colorizer](http://stevenlevithan.com/regex/colorizer/)
.cm-s-default span.cm-a{background: #aad1f7;}
.cm-s-default span.cm-b{background: #f9ca69;}
.cm-s-default span.cm-c{color: #007a09;}
.cm-s-default span.cm-g1{background: #d2f854;}
.cm-s-default span.cm-g2{background: #9ec70c;}
.cm-s-default span.cm-g3{background: #ecc9f7;}
.cm-s-default span.cm-g4{background: #54b70b;}
.cm-s-default span.cm-g5{background: #b688cf;}
@douglasduteil
douglasduteil / README.md
Last active August 5, 2021 12:03
HACK publishing 6to5|babel/bowser.js to the people ! :D

HACK publishing babel/bowser.js to the people ! :D (version : 5.1.10)

xclip -sel clip < ~/.nvm/current/lib/node_modules/babel/node_modules/babel-core/browser.js
xclip -sel clip < ~/.nvm/current/lib/node_modules/babel/node_modules/babel-core/browser-polyfill.js