Skip to content

Instantly share code, notes, and snippets.

🤖
Working

Dominik Wilkowski dominikwilkowski

🤖
Working
Block or report user

Report or block dominikwilkowski

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
@dominikwilkowski
dominikwilkowski / README.md
Last active May 19, 2020
Ubuntu setup with NGINX http/2 and letsencrypt
View README.md

Intro

This is a basic collection of things I do when setting up a new headless ubuntu machine as a webserver. Following the steps below should give you a reasonable secure server with HTTP/2 support (including ALPN in chrome) and the fast NGINX server. I am happy to add things so leave a comment.

Basics

After creating the server (droplet on DigitalOcean) log in with

@dominikwilkowski
dominikwilkowski / README.md
Created May 14, 2020
Signed git commits with Git Tower on Catalina
View README.md
@dominikwilkowski
dominikwilkowski / Readme.md
Last active Apr 5, 2020
How to install a man page into a node.js app
View Readme.md

How to install a man page into a node.js app

Cuttlebelle man page

Installing a man page is not easy as there are little infos out there about it.

After a lot of trial and error, google searches and alpha publishing my app I finally have a collection of things I need to do to get it working:

@dominikwilkowski
dominikwilkowski / README.md
Last active Mar 9, 2020 — forked from evangs/delete-old-files.js
Batch delete old files from Slack
View README.md

Batch delete old file from your slack workspace

Freeing space

To free up some space in your slack workspace and having to delete each file by hand

To run the app you first need a legacy token from slack for your workspace. Then download the cleanSlack.js file and run it via Node.js.

By default the script will delete files older than a year. You can change that in the TIMESTAMP variable.

@dominikwilkowski
dominikwilkowski / 00-README.md
Last active Oct 19, 2019
Doc strangelove outline love
View 00-README.md

Handle focus styling for keyboard and mouse users

See below code for React, Vanilla JavaScript and jQuery.

Read more in my article

@dominikwilkowski
dominikwilkowski / README.md
Created Feb 22, 2017
Flatten javascript objects into a single-depth object with ES6
View README.md

Flatten a deep javascript object into single-depth object with ES6

Call it via:

const flat = flatten( realDeepObject );

Test case:

@dominikwilkowski
dominikwilkowski / shop.js
Last active Jul 3, 2019
Convert variant dropdown into swatches, multiple-option-sollution
View shop.js
/**************************************************************| CONVERT VARIANT TO SWATCHES |*/
$(function() {
if($(".single-option-selector").length) {
$(".single-option-selector").each(function(i) {
var $thisSelect = $(this);
var $newClass = "js-option-selector-" + i;
var $newOptions = '<ul class="new-variant-swatchs">';
var $currentOption = $thisSelect.val();
@dominikwilkowski
dominikwilkowski / service-workers.md
Created Sep 5, 2018 — forked from Rich-Harris/service-workers.md
Stuff I wish I'd known sooner about service workers
View service-workers.md

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@dominikwilkowski
dominikwilkowski / README.md
Last active Sep 26, 2018
SVG with two colors embedded
View README.md

SVG with two colors embedded

View find node process to kill.md

To find a hidden node process

List all node processes:

ps -e|grep node

Make note of the process ID and kill it by:

You can’t perform that action at this time.