Skip to content

Instantly share code, notes, and snippets.

View Kilian's full-sized avatar
✌️
more code!

Kilian Valkhof Kilian

✌️
more code!
View GitHub Profile
=border-radius(!radius)
:-moz-border-radius = !radius
:-webkit-border-radius = !radius
:-o-border-radius = !radius
:border-radius = !radius
=border-top-left-radius(!radius)
:-moz-border-radius-topleft = !radius
:-webkit-border-top-left-radius = !radius
:-o-border-top-left-radius = !radius
//place inside an anonymous function
(function ($) {
// on document ready code
$(function(){
$.namespace.functionName();
$.namespace2.anotherFunctionName();
});
}(jQuery));
@Kilian
Kilian / annoying.js
Created January 6, 2011 15:04
How to be an asshole
/**
* Annoying.js - How to be an asshole to your users
*
* DO NOT EVER, EVER USE THIS.
*
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com)
* Visit https://gist.github.com/767982 for more information and changelogs.
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors
*
function w {
if [[ $1 == "" ]]; then
command cd ~/workspace/;
else
command cd ~/workspace/$1;
fi;
}
.hbox {
display:-webkit-box;
display:-moz-box;
display:-ms-flexbox;
display:flex;
-webkit-box-align:stretch;
-moz-box-align:stretch;
-ms-flex-align:stretch;
-webkit-align-items:stretch;
@Kilian
Kilian / keybase.md
Created April 11, 2014 07:12
keybase.md

Keybase proof

I hereby claim:

  • I am kilian on github.
  • I am kilianvalkhof (https://keybase.io/kilianvalkhof) on keybase.
  • I have a public key whose fingerprint is 5ED3 AD1D 6897 2037 8F9F DFFA 574A E54D F89B 7F1C

To claim this, I am signing this object:

Verifying that +kilian is my openname (Bitcoin username). https://onename.io/kilian
@Kilian
Kilian / SketchSystems.spec
Last active September 7, 2018 07:38
Dataflow
Dataflow
Ongepubliceerd
publiceren -> In Review
wijzigingen maken -> Ongepubliceerd
In Review
goedgekeurd -> Zichtbaar
afgekeurd -> Ongepubliceerd
wijzigingen maken -> In Review
@Kilian
Kilian / convertMailto.js
Created April 17, 2020 14:47
Quick gist that converts clicked mailto links to copy-to-clipboard
const convertMailto = () => {
const copyToClipboard = str => {
const el = document.createElement("textarea");
el.value = str;
el.setAttribute("readonly", "");
el.style.position = "absolute";
el.style.opacity = "0";
el.style.pointerEvents = 'none';
document.body.appendChild(el);
@Kilian
Kilian / lang-outline.css
Last active October 21, 2020 08:39
Highlight elements with a lang attribute (and show the lang value)
[lang] {outline:2px solid yellow}
[lang]::before {
content: attr(lang);
display:block;
position:absolute;
color:black;
background: yellow;
padding:0.5em;
font-family:monospace;
}