Skip to content

Instantly share code, notes, and snippets.

Avatar
🌍
<3

Mathieu KIM ROBIN MathRobin

🌍
<3
  • /dev/null
View GitHub Profile
@MathRobin
MathRobin / clone-certbot.sh
Last active May 19, 2020
Install Let's encrypt certbot
View clone-certbot.sh
git clone https://github.com/certbot/certbot.git
cd certbot
./certbot-auto --help all
@MathRobin
MathRobin / index.js
Created Oct 31, 2019
object to json oas
View index.js
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 Aug 26, 2016
Active Free SSL on Heroku
View heroku-free-ssl.sh
heroku labs:enable http-sni --app <your app>
heroku plugins:install heroku-certs
@MathRobin
MathRobin / grid-detect.html
Created Jul 10, 2019
Bootstrap grid displayer
View grid-detect.html
<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>
View isolateApp.directive.js
.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();
View lds-spinner html
<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>
View safari-reaper.html
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body {
background: repeat url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/7QCIUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGscAVoAAxslRxwCAAACAAAcAnQAV8KpIENoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbGQgLSBodHRwOi8vd3d3LnJlZGJ1YmJsZS5jb20vcGVvcGxlL0NoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh0AAAAAENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBhY2thcmQgQ29tcGFueQAAZGVzYwAAAAAAAAASc1JHQiBJRUM2MTk2Ni0yLjEAAAAAAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAA
@MathRobin
MathRobin / liste.md
Last active May 30, 2018
Livres Thinkerview
View liste.md

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
View debug tout
<pre ng-repeat="(key, val) in this">{{key}} = {{val|json}}</pre>
View upsert.sql
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);
You can’t perform that action at this time.