I hereby claim:
- I am moqmar on github.
- I am momar (https://keybase.io/momar) on keybase.
- I have a public key whose fingerprint is 8D0D F6B3 C0E7 963C 4DD8 3FFD 57C5 EC5D A3B7 595E
To claim this, I am signing this object:
@media print { | |
#st-container, #prk_responsive_menu, #unten { display: none; } | |
#prk_ajax_container { margin-left: 0; } | |
#sidebar { display: none; } | |
#centered_block { max-width: 100%; } | |
.twelve.columns.sidebarized { padding: 0; } | |
/* Steht sonst in der linken Seitenleiste: */ | |
body:after { content: "Wortwuchs.net"; display: block; text-align: right; font-size: 10pt; color: #888; margin-right: 25px; } | |
} |
<!doctype html> | |
<meta charset="utf-8"> | |
<style> | |
@import 'https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css'; | |
@import 'https://fonts.googleapis.com/css?family=Fira+Sans'; | |
body { margin: 0; padding: 25px; background: #f8f8f8; font-family: Fira Sans, sans-serif; } | |
/* ... */ | |
</style> |
// Element Selection - _("#howcoolisthat") - https://gist.github.com/moqmar/55587fad606176fafbcf7777655f2fbe | |
// document.querySelector | |
window._ = document.querySelector.bind(document) | |
// document.querySelectorAll with callback | |
window.__ = function (selector, callback, element) { | |
var elements = Array.prototype.slice.call((element||document).querySelectorAll(selector)); | |
if (typeof callback == "function") | |
for (var i = 0; i < elements.length; i++) |
I hereby claim:
To claim this, I am signing this object:
/* | |
BASE.CSS | |
‾‾‾‾‾‾‾‾ | |
Simple but beautiful styling for all basic HTML elements. Useful as a basic stylesheet to build upon. | |
Version 0.4 | |
Created by Moritz Marquardt, mo-mar.de | |
Licensed under CC0 - https://creativecommons.org/publicdomain/zero/1.0/ | |
Provided classes: |
// Leftpad - P(value, length, character, rightpad) - https://gist.github.com/moqmar/9ef4f0755d0a17b61458f35b91447bc1 | |
function P(v,l,c,r) { v = v.toString(); while (v.length < l) v = r ? v + (c||0) : (c||0) + v; return v; } | |
// Usage: P(value, length, character, rightpad) | |
// P(25, 3) ➜ "025" | |
// P(1, 3, " ") ➜ " 1" | |
// P(25, 4, ".", true) ➜ "25.." | |
// public domain / cc0 |
// Parent Elements - e.P("body") - https://gist.github.com/moqmar/0995cf6595201f7a062fb173cb4ab938 | |
(function(E){E.matches||(E.matches=E.matchesSelector||E.msMatchesSelector||E.webkitMatchesSelector)})(Element.prototype) | |
Element.prototype.P = function(s) { | |
var e = this; | |
if (!s || typeof s == "number") for (var i = 0; i < (s || 1); i++) e = e ? e.parentElement : e; | |
else if (typeof s == "string") while (e && !e.matches(s)) e = e.parentElement; | |
else while (e && e != s) e = e.parentElement; | |
return e | |
} |
…in less than half a kilobyte
All you need is the file modal.min.css
and the following code:
<input id="helloworld" type="checkbox" hidden><div class="modal">
<label for="helloworld"></label><!-- close modal on click -->
<div><!-- modal contents -->
<h1>Look at this awesomeness!</h1>
// Modified version of https://stackoverflow.com/a/987376 | |
function selectText(el) { | |
if (!el) return; | |
var range, selection; | |
if (document.body.createTextRange) { | |
range = document.body.createTextRange(); | |
range.moveToElementText(el); | |
range.select(); | |
} else if (window.getSelection) { | |
selection = window.getSelection(); |
#!/bin/sh | |
# ./Dockerscript <prefix> | |
name=helloworld | |
[ -n "$PREFIX" ] && prefix=-$PREFIX | |
set -e | |
start() { | |
docker network create --driver bridge $name$prefix | |
docker run -id --restart=always --network=$name$prefix -v "$PWD/files:/data" --name=$name$prefix-main "$@" hello-world |