Skip to content

Instantly share code, notes, and snippets.

View bdavidxyz's full-sized avatar
🏠
Working from home

David Boureau bdavidxyz

🏠
Working from home
View GitHub Profile
@bdavidxyz
bdavidxyz / gist:1af552194095e0ebde07aec07f631b13
Created January 3, 2019 09:42
remove all stale branch in github
NodeList.prototype.forEach = Array.prototype.forEach;
document.querySelectorAll('.js-branch-row button[type="submit"].text-red').forEach(function(el){el.click()});
JSON.stringify({
h1:$('h1').map(function(){return $.trim($(this).text());}).get(),
h2:$('h2').map(function(){return $.trim($(this).text());}).get(),
h3:$('h3').map(function(){return $.trim($(this).text());}).get(),
h4:$('h4').map(function(){return $.trim($(this).text());}).get(),
h5:$('h5').map(function(){return $.trim($(this).text());}).get(),
h6:$('h6').map(function(){return $.trim($(this).text());}).get()
},null, 2)
@bdavidxyz
bdavidxyz / 50x.html
Created October 2, 2018 09:30
50x_of_clara
<!DOCTYPE html>
<html>
<head>
<meta content="initial-scale=1, maximum-scale=1" name="viewport">
<title>Clara | Erreur 500</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:700" rel="stylesheet">
<style type="text/css">
body {
font-family: 'Roboto';
}
@bdavidxyz
bdavidxyz / 404
Created October 2, 2018 09:27
404_of_clara
<!DOCTYPE html>
<html>
<head>
<meta content="initial-scale=1, maximum-scale=1" name="viewport">
<title>Clara | Erreur 404</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:700" rel="stylesheet">
<style type="text/css">
body {
font-family: 'Roboto';
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// var forceArray = _.cond([
// [_.isArray, _.identity],
// [_.stubTrue,_.stubArray]
// ]);
// forceArray(_.attempt(_.isError, '>_>'))
// _.isError(_.attempt(computeArray, [1,4,5])) ? console.error()
function hello() {
console.log("hello max");
}
@bdavidxyz
bdavidxyz / classtrophobic.js
Last active February 11, 2018 13:01
Classtrophobic transpiled
/*
* Classtrophobic, https://github.com/WebReflection/classtrophobic
* Plain Old Javascript version, transpiled by babel (master branch)
* All credits goes to
*! (C) 2017 Andrea Giammarchi - MIT Style License
*/
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
@bdavidxyz
bdavidxyz / gist:2f6275160800eae136c7db19d5b468bc
Created January 25, 2018 11:27
auto refresh chrome based on url
var oldURL = "";
function checkURLchange(currentURL){
if(window.location.href !== localStorage.getItem('oldURL') && !document.body){
oldURL = window.location.href;
location.reload();
localStorage.setItem('oldURL', oldURL);
}
setInterval(function() {
checkURLchange(window.location.href);