Skip to content

Instantly share code, notes, and snippets.

@tillg
tillg / obsidian-web-clipper.js
Created June 8, 2022 18:21 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@tillg
tillg / npm-scripts-for-docker.md
Created April 20, 2020 10:11 — forked from duluca/npm-scripts-for-docker.md
npm scripts for Docker

These are generic npm scripts that you can copy & paste into your package.json file as-is and get access to convinience scripts to manage your Docker images all in one place.

How to Use

npm i -g mrm-task-npm-docker
npx mrm npm-docker

Contribute

Here's the code repository https://github.com/expertly-simple/mrm-task-npm-docker

@tillg
tillg / terminal-git-branch-name.md
Created February 5, 2020 12:01 — forked from joseluisq/terminal-git-branch-name.md
Add Git Branch Name to Terminal Prompt (Mac)

Add Git Branch Name to Terminal Prompt (Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@tillg
tillg / employees.csv
Last active June 14, 2018 19:00
Employee statistics with D3
Full_name Gender Starting_day Leaving_day
Benny Hunt Male 2016-01-01 2016-02-19
Edgar Chavez Male 2016-01-01
Hector Marsh Male 2016-01-11 2016-02-19
Roderick Malone Male 2016-01-01
Elmer Castillo Male 2016-01-01 2017-09-30
Toni Cain Male 2016-01-01 2017-06-14
Patrick Barber Male 2016-03-07
Virginia Andrews Female 2016-03-14
Beatrice Adams Female 2016-04-18
@tillg
tillg / .block
Last active June 14, 2018 14:19
D3 v4 Bar Chart Transition
license: mit
@tillg
tillg / .block
Last active June 14, 2018 14:15 — forked from yoavniran/chart.css
d3 bar chart with rising bars transition
license: mit
@tillg
tillg / app.js
Created March 9, 2016 03:58
A JS snippet to display a message only if it's a certain time in Germany (no matter where I am with my browser). Made by Anh.
'use strict';
function nightlyMarker() {
// get current client local time
// convert the local time to the "Europe/Berlin" timezone and get the hours
// the Daylight Saving Time is also cared
var startTime = 2; //am
var currentHours = new moment().tz("Europe/Berlin").hours();
// if now is between 2am and 3am it should be displayed as block otherwise it should be hided
var displayProperty = (currentHours === startTime) ? "block" : "none";
// attach the displayProperty to the nightlyMarker
@tillg
tillg / _.md
Last active February 14, 2016 10:15
ping times
@tillg
tillg / _.md
Last active October 25, 2016 04:49
ColoredRectangles

Have Colored Rectangles in d3