Skip to content

Instantly share code, notes, and snippets.

@douglasduteil
douglasduteil / install_kube-resource-report.sh
Created Dec 18, 2019
kube-resource-report.dev.fabrique.social.gouv.fr install
View install_kube-resource-report.sh
$ 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]=/" \
View remove_gitlab_old_images.js
(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 / clean-mirror-branches.sh
Last active Jul 22, 2019
Delete branches on mirror remote
View clean-mirror-branches.sh
#!/usr/bin/env bash
set -eu -o pipefail
#
ORIGIN=${1:="origin"}
SUPER=${2:="super"}
#
@douglasduteil
douglasduteil / .travis.yml
Last active May 11, 2019 — 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.....".
View .travis.yml
---
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 Mar 21, 2019
Here is a start of a regex mode for CodeMirror inspired by [Regex Colorizer](http://stevenlevithan.com/regex/colorizer/)
View codemirror-mode-regex.css
.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 / x1.md
Last active Nov 3, 2017
Deployment graph for release crane system
View x1.md
+------------------+
|                  |
|  User Terminal   +----+                                        Travis
|                  |    |
+------------------+    |      +-------------------------+       +------------------+
                        |      |                         |       |                  |
                        +------>  Git Tag "release-plz"  +------>+  API Deployment  |
                        |      |                         |       |                  |
+------------------+    |      +-------------------------+       +-+----------------+
@douglasduteil
douglasduteil / stats.json
Last active Sep 29, 2017
RePeople "yarn run webpack --json > stats.json"
View stats.json
{
"errors": [],
"warnings": [],
"version": "3.6.0",
"hash": "71c562100488c2ac824e",
"time": 2494,
"publicPath": "",
"assetsByChunkName": {
"main": "bundle.js"
},
View report.json
{
"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 / data.json
Created Aug 19, 2014
AngularMovie datas
View data.json
[
{
"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"
@douglasduteil
douglasduteil / README.md
Last active Mar 10, 2017
Arch install notes
View README.md

Arch install notes

Install utils

sudo pacman -S tree yaourt terminator gnome-tweak-tool vlc ffmpeg  

ZPlug

You can’t perform that action at this time.