Skip to content

Instantly share code, notes, and snippets.

Avatar
📱
Working

Quentin Dreyer qkdreyer

📱
Working
View GitHub Profile
@qkdreyer
qkdreyer / WE-Markdown.css
Created Jan 12, 2022 — forked from jerone/WE-Markdown.css
Github Flavored Markdown Stylesheet for Web Essentials
View WE-Markdown.css
html {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
font-family: sans-serif;
}
body {
margin: 0;
padding: 30px;
min-width: 1020px;
View zkbench.php
<?php
function exists($zk, $res, $token) {
try {
return $zk->get($res) == $token;
} catch (\ZookeeperException $ex) {
return false;
}
}
@qkdreyer
qkdreyer / Y.js
Created Jun 9, 2018
ES6 Y Combinator One Liner
View Y.js
// http://kestas.kuliukas.com/YCombinatorExplained/
// https://rosettacode.org/wiki/Y_combinator#JavaScript
//
// const factorial = Y(next => (n) => {
// if (n < 2) return 1;
// return n * next(n - 1);
// });
// console.log(factorial(5)); // 120
const Y = f => (...args) => f(Y(f))(...args);
@qkdreyer
qkdreyer / cloudSettings
Last active Mar 9, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2020-03-09T19:56:45.862Z","extensionVersion":"v3.4.3"}
@qkdreyer
qkdreyer / grevby.sh
Last active Feb 23, 2020
Git Reviewed By
View grevby.sh
#!/bin/sh
git config --global alias.revby "interpret-trailers --trailer \"Reviewed-by: $(git config user.name) <$(git config user.email)>\" --in-place"
git rebase @ --exec 'GIT_EDITOR="git revby" git commit --amend'
View gist:3e5c7e7f263cf7a1294c4c5ba9498c36
Non Breaking Space Character
/[\u00A0]+/
Base Combining Characters
/[\u0300-\u036F]+/
@qkdreyer
qkdreyer / _.toObjectURL.js
Last active Mar 1, 2018
Lodash/Underscore dataURI/base64/string/typedArray to objectURL mixin
View _.toObjectURL.js
_.mixin({
dataURIToObjectURL(dataURI) {
return this.blobToObjectURL(this.dataURIToBlob(dataURI));
},
base64ToObjectURL(base64, type) {
return this.blobToObjectURL(this.base64ToBlob(base64, type));
},
stringToObjectURL(string, type) {
return this.blobToObjectURL(this.stringToBlob(string, type));
},
@qkdreyer
qkdreyer / crypto-loot.js
Last active Nov 26, 2017
Crypto Loot Script
View crypto-loot.js
(function(doc, tag, cb) {
var js = doc.createElement(tag), ref = doc.getElementsByTagName(tag)[0];
js.async = true;
js.onload = js.onreadystatechange = function(_, isAbort) {
if (isAbort || !js.readyState || /loaded|complete/.test(js.readyState)) {
js.onload = js.onreadystatechange = null;
js = undefined;
!isAbort && cb && cb();
}
};
View keybase.md

Keybase proof

I hereby claim:

  • I am qkdreyer on github.
  • I am qkdreyer (https://keybase.io/qkdreyer) on keybase.
  • I have a public key ASAB85aNeoCds9DgXm0Sg_fhSRUViA9ZSZ6QdmMYv0rZ9go

To claim this, I am signing this object:

@qkdreyer
qkdreyer / ios-webinspector
Last active Dec 15, 2016
Automatically open Safari Web Inspector
View ios-webinspector
#!/usr/bin/osascript
# Automatically open Safari Web Inspector
set _browser to "Safari"
set _develop to "Développement"
set _inspector to "Inspecteur web"
set _phone to "iPhone"
set _ignore to "about:"
tell application _browser to activate