Skip to content

Instantly share code, notes, and snippets.

View MathRobin's full-sized avatar
🌍
<3

Mathieu KIM ROBIN MathRobin

🌍
<3
  • CTO Airporting
  • Pessac, Gironde, France
View GitHub Profile
@MathRobin
MathRobin / clone-certbot.sh
Last active May 19, 2020 19:07
Install Let's encrypt certbot
git clone https://github.com/certbot/certbot.git
cd certbot
./certbot-auto --help all
@MathRobin
MathRobin / index.js
Created October 31, 2019 10:06
object to json oas
function doc (obj){
var res = {};
_.each(obj, function (val, key) {
if(_.isArray(val)) {
res[key] = {"type": "array", items:{type:"object","properties": doc(val)}};
} else if(_.isObject(val)) {
res[key] = {"type": "object","properties": doc(val)};
} else if(_.isString(val)){
res[key] = {type:'string'};
} else if(_.isInteger(val)){
@MathRobin
MathRobin / heroku-free-ssl.sh
Created August 26, 2016 08:20
Active Free SSL on Heroku
heroku labs:enable http-sni --app <your app>
heroku plugins:install heroku-certs
@MathRobin
MathRobin / grid-detect.html
Created July 10, 2019 08:24
Bootstrap grid displayer
<div class="row">
<div class="col-12 d-block d-sm-none">XS</div>
<div class="col-12 d-none d-sm-block d-md-none">SM</div>
<div class="col-12 d-none d-md-block d-lg-none">MD</div>
<div class="col-12 d-none d-lg-block d-xl-none">LG</div>
<div class="col-12 d-none d-xl-block">XL</div>
</div>
@MathRobin
MathRobin / isolateApp.directive.js
Created May 31, 2019 11:51
angularjs isolateApp
.directive('isolateApp', function ($injector, $interval, User) {
return {
scope: {},
restrict: 'E',
compile: function (element, attrs) {
var html = element.html();
element.html('');
return function (scope, element) {
scope.$destroy();
@MathRobin
MathRobin / lds-spinner html
Created January 9, 2019 16:18
Sass loader
<div class="lds-spinner">
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
</div>
@MathRobin
MathRobin / liste.md
Last active May 30, 2018 15:04
Livres Thinkerview

En désordre

  • Le successeur de Pierre, Jean Michel
  • Georges balandier, anthropologue politique
  • Traité de servitude volontaire
  • Saga de l'assassin royal, Robin hobe
  • Introduction au siècle des menaces, Jacques blamont
  • Transition 2017, Vincent Mignerot
  • Comment les riches détruisent la planète
@MathRobin
MathRobin / debug tout
Created November 23, 2017 15:22
Angularjs
<pre ng-repeat="(key, val) in this">{{key}} = {{val|json}}</pre>
WITH upsert AS
(UPDATE maTable
SET monChamp = 'nouvelleValeur';
WHERE monId = cetId
RETURNING *)
INSERT INTO maTable
(monId, monChamp)
SELECT cetId, 'nouvelleValeur'
WHERE NOT EXISTS (SELECT * FROM upsert);
@MathRobin
MathRobin / cert.sh
Last active August 26, 2016 22:13
Run certbot
./certbot-auto certonly --manual --email admin@mondomaine.fr -d mondomaine.fr -d www.mondomaine.fr