Skip to content

Instantly share code, notes, and snippets.

View dominikschreiber's full-sized avatar

Dominik Schreiber dominikschreiber

View GitHub Profile
@dominikschreiber
dominikschreiber / file.mjs
Created February 2, 2023 12:20
istanbul export const coverage repro
export const num = 1;
var i = setInterval(function() {
var $p = document.createElement('p')
$p.textContent = new Date()
document.body.appendChild($p)
}, 2 * 1000)
eval('var $p = document.createElement("p"); $p.textContent = "Im evaled"; document.body.appendChild($p)')
setTimeout(function() {
var $p = document.createElement('p')
@dominikschreiber
dominikschreiber / git.sh
Created April 1, 2015 11:04
various improvements for the git command line interface
# kudos to https://coderwall.com/p/euwpig/a-better-git-log
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@dominikschreiber
dominikschreiber / adb-push-picture.sh
Last active August 29, 2015 14:18
various adb utils
#!/bin/sh
# push picture to android device and make it available in gallery
# kudos to https://groups.google.com/forum/#!topic/appium-discuss/QWkhvs_rEtk
PICTURES=/mnt/sdcard/Pictures
adb push $1 $PICTURES
adb shell am broadcast -a android.intent.action.MEDIA_MOUNTED -d file://$PICTURES
@dominikschreiber
dominikschreiber / blog.fefe.de-material-redesign.css
Last active December 24, 2015 02:47
userstyle for blog.fefe.de resembling the google material design (using deep purple 500)
@-moz-document domain("blog.fefe.de") {
/*
* $brand-primary: #673AB7; // deep purple 500
*/
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
@-moz-document url("http://dj4br.home.t-link.de/lautspr.htm") {
html {
font-size: 16px;
}
body {
background-image: none;
font-family: Georgia, serif;
}
@dominikschreiber
dominikschreiber / Einladungs-Email.md
Created December 13, 2014 15:59
Einladung unlimited-Weihnachtsfeier 17.12. 19:00 Uhr

Hallo liebes unlimited-Team,

wir wollen mit einem gemeinsam Racletteessen das Jahr beenden, dazu lade ich euch herzlich ein:

Mittwoch 17.12. 19:00 Uhr in der Böhlstraße 5, Ludwigshafen

Damit wir Raclettegeräte, Kartoffeln und den Einkauf planen können, tragt euch bitte verbindlich in die folgende Doodle ein: http://doodle.com/v3r72wdesa6tfsne

@dominikschreiber
dominikschreiber / gifted-response.sng
Created October 5, 2014 06:11
Gifted Response - deutsche Übersetzung
Verse
Das ist eine Antwort auf Dein Geschenk:
Vater, wir können nicht aus eigener Kraft zu Dir kommen.
Wir kommen im Namen deines Sohnes,
der Dich und die Kraft Deines Geistes verherrlicht.
---
Pre-Chorus
Wir sind zu etwas so mysteriösem gekommen,
was wir mit unserem Verstand nicht verstehen können,
durch die offene Tür, wo die Engel singen,
@dominikschreiber
dominikschreiber / responsive-image.mixin.less
Last active December 24, 2015 01:39
Mixin for responsive images using the background-image technique (as explained [here](http://mobile.smashingmagazine.com/2013/07/22/simple-responsive-images-with-css-backgrounds/)). Takes a base file name (i.e. `background.png`), breakpoints and used postfixes (i.e. `0px` = `-xsmall` ), and a hidpi-image postfix (i.e. `@2x`). Splits the file nam…
.responsive-image( @file, @responsive-postfixes, @hidpi-postfix ) {
@filename: `(function() { return @{file}.substring(0,@{file}.lastIndexOf('.')) })()`;
@filetype: `(function() { return @{file}.substring(@{file}.lastIndexOf('.')) })()`;
@amount: unit(`(function() { return Object.keys(JSON.parse(@{responsive-postfixes})).length })()`);
.loop( @index ) when ( @index < @amount ) {
@breakpoint: `(function() { return Object.keys(JSON.parse(@{responsive-postfixes}))[@{index}] })()`;
@nextBreakpoint: `(function() { return ( @{index} + 1 < @{amount} ) ? Object.keys(JSON.parse(@{responsive-postfixes}))[@{index}+1] : '99999px' })()`;
@postfix: `(function() { return JSON.parse(@{responsive-postfixes})[@{breakpoint}] })()`;