Skip to content

Instantly share code, notes, and snippets.

View broucz's full-sized avatar
💭
q @ k

Pierre Brouca broucz

💭
q @ k
View GitHub Profile
const asyncHandler =
async (endpoint, options) => {
const rawData = await fetch(endpoint, {...options});
return await rawData.json();
};
const data = asyncHandler('/the_endpoint');
data.then(result => console.log(result));
@broucz
broucz / perf.js
Created August 18, 2015 07:41
basic perf
let t0 = performance.now();
let t1 = performance.now();
console.log("perf -> " + (t1 - t0) + " ms.");
@broucz
broucz / fun
Created October 8, 2013 20:09 — forked from tholman/fun
cd ~/Library/Application\ Support/Google/Chrome/Default/User\ StyleSheets
echo 'html { -webkit-animation: adjustHue 20s infinite !important; } @-webkit-keyframes adjustHue { 50% { -webkit-filter: hue-rotate(360deg); }}' >> Custom.css
@broucz
broucz / gist:4065077
Created November 13, 2012 10:30
CSS: image replacement
.ir {
border: 0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}