Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
Working

Dominik Wilkowski dominikwilkowski

🤖
Working
View GitHub Profile
@dominikwilkowski
dominikwilkowski / Emoji.js
Last active Jul 22, 2021
Accessible emoji react/emotion component
View Emoji.js
import { keyframes } from '@emotion/react';
const fadeIn = keyframes`
from {
bottom: -0.5em;
opacity: 0;
}
to {
bottom: 100%;
opacity: 1;
@dominikwilkowski
dominikwilkowski / Readme.md
Last active Jul 20, 2021
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 / defaults.css
Last active Jul 7, 2021
A handy set of styles I find myself applying to all new projects
View defaults.css
/*! Loosely derived from https://gist.github.com/jackdomleo7/55659bafe581d19cc341ef775d6a9e6b */
@import ('Import normalizer stylesheet here');
::selection {
text-shadow: none;
color: #fff;
background-color: rgba(0, 0, 255, 0.1);
}
@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 / README.md
Last active Oct 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 Sep 5, 2020
ANSI codes for cli controled output
View README.md

ANSI escape codes

ANSI escape codes can be printed to a shell to as instructions. The below is a list of codes I have used often in my CLI programs and I find myself looking up over and over again.

A great article about it can be found here.

Content

@dominikwilkowski
dominikwilkowski / README.md
Last active Jul 31, 2020
CSS Optimization
View README.md

Case 1

This seems super easy and should be simple... (Famous last words)

<div class="a b"></div>
.a {
@dominikwilkowski
dominikwilkowski / README.md
Last active Jul 15, 2020
Mono fantasy API
View README.md

Fantasy API for MO

Premise: A framework to add files to a monorepo easily.

Config

config.mo.js

export default {
@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 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.