Skip to content

Instantly share code, notes, and snippets.

🏳️‍🌈
Unstoppable

Simon Menke fd

🏳️‍🌈
Unstoppable
Block or report user

Report or block fd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:fb618ff2b0a9526be55c35b139965863
const { permissions, revokePermission, open } = Deno;
const encoder = new TextEncoder();
const logPromise = open('request.log', 'a+');
// Revoke all permissions
const perms = permissions();
for (const perm in perms) {
if (perms[perm]) {
console.log('revoked '+perm);
View side-navigation.css
@import '../base/media-queries.css';
@import '../base/variables.css';
.main {
@media (--mq-up-to-medium) {
display: none;
}
@media (--mq-from-medium) {
left: 0;
@fd
fd / index.md
Last active Mar 26, 2018
Perfomance cost estimation language
View index.md

The goal of this document is to start a discussion around how we can better communicate and estimate the performance cost of designs according to what is what information is displayed on a pages.

Performance cost estimation notation

Often the limitations and performance implications of a design only become apparent after the design and even after the design was implemented. Resulting in slow(-er) pages and the need to go back and tweak or fix at least the implementation of the design and sometimes even the design itself.

This is an attempt at making the performance cost of a design more visible and communicable.

@fd
fd / sec.pem
Last active Sep 12, 2018
*-util[s] deploy info
View sec.pem
-----BEGIN SEC BOX-----
Cm4KIPiuq0bSkuBK+g9gmOniB6V8pCo8hV+OALiV7vRcMKw4EhgpMqmFKu/EL4hT
hwlLFvFHKkUYpVPoveIaMFq1SLYfgmKP+2ubmY4eGLhKax8StioVF93KduPvCayH
4TBdNME8gXXC3o6OkbTuGgpuCiDUfRvY9cZb1CAD3xKkVMff8hD+nOP/aUkILS6k
YVeTVxIYNsnuclmYVuJLzHi+tI3t60PRvNPgBxtOGjDkj4u3+Mbz3OPidBjfbRp/
ZUO5JqWcAXdN+g6U4Wi7yEt3nkz8lQSccG5oPpuwFdUKbgog6/xaUyL7Q5t8k29i
HH5jjTACDmeKtTA2ho8SKzVqwjESGALW4tXH4f2FEvaoNwz9OdWl03Nl9YLf6Row
HUGnA73VzK5gEXpf3vYqh2gcHRks3OxMHfC0wNFB7k1ETGFRX60lcLX9idZLstW+
Cm4KIPO1Z8kKreuifNfkP1dMpjYZ9IAx7/gRnNblDrCh12duEhhtH8p4qClMF1G2
imzYgAehcBvszWBuxicaMICYLHTkf9Re1/QJhlIHOIShLppVQ3b83kvnyTgUk017
@fd
fd / docker_dlite_install.md
Last active Apr 18, 2016
Install dlite and docker
View docker_dlite_install.md

Install Docker for Mac

  • Docker.dmg is in Dropbox/tools
  • The key is in Dropbox/tools/DockerKey.md
  • run docker-route
sudo docker-route install
sudo docker-route start
View keybase.md

Keybase proof

I hereby claim:

  • I am fd on github.
  • I am fd (https://keybase.io/fd) on keybase.
  • I have a public key whose fingerprint is 9AB5 95B2 209A 9BC9 1DF7 9884 945D DA57 4870 AA72

To claim this, I am signing this object:

View swagger.yaml
---
swagger: "2.0"
host: example.cm
info:
title: "test"
version: "1"
paths:
"/test":
get:
responses:
@fd
fd / mod.css
Created Aug 13, 2015
css-modules
View mod.css
.title {
// ...
}
.body {
// ...
}
View slugify.js
function slugify(text) {
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}
View esnext_safeurl.js
let who = "Simon Menke";
let spec = ['age', 28];
let u = url`/hello/${who}/${spec}`;
// => "/hello/Simon%20Menke/age/28"
function url(tmpl, ...args) {
let len = tmpl.length-1;
let url = tmpl[0];
You can’t perform that action at this time.