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 / 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 / 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

@douglasduteil
douglasduteil / zippy.js
Created Feb 12, 2016
Shows how to write a zippy component in pure ES6
View zippy.js
// following https://github.com/angular/angular/blob/2.0.0-beta.6/modules/playground/src/zippy_component/zippy.ts
import {Component, EventEmitter, Input, Output} from 'angular2/core';
import {ObservableWrapper} from 'angular2/src/facade/async';
export Zippy;
Zippy.annotations = [
new Component({
selector: 'zippy',
@douglasduteil
douglasduteil / README.md
Last active Nov 30, 2015
douglasduteil...jspm-server experiments results
View README.md

douglasduteil...jspm-server experiments results

Here comes the raw results

HTTP 1

  • No config
  • Record

douglasduteil jspm-server-demo-http1

@douglasduteil
douglasduteil / README.md
Last active Aug 29, 2015
HACK publishing 6to5|babel/bowser.js to the people ! :D
View README.md

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
You can’t perform that action at this time.