Skip to content

Instantly share code, notes, and snippets.

View mischah's full-sized avatar
:octocat:
afk // brb

Michael Kühnel mischah

:octocat:
afk // brb
View GitHub Profile
@mischah
mischah / delay.js
Created April 14, 2019 20:59
Promisified setTimeout
// Promisified setTimeout
const delay = (duration = 0) =>
new Promise(resolve =>
setTimeout(() => {
resolve();
}, duration)
);
// Usage
async function myFunction() {
@mischah
mischah / How to.md
Last active May 4, 2018 09:45
VSCode Settings for formatting using Prettier

How to setup Prettier to manually format your code

  1. Install Prettier
  2. Update User Settings
    {
      "editor.formatOnPaste": false,
      "editor.formatOnSave": false,
    }
@mischah
mischah / .bashrc || .zshrc
Last active February 20, 2022 02:13
Aliases to trash node_modules and lockfiles via Yarn and npm
alias npm-reset="rm -rf node_modules && rm -f package-lock.json && npm install && npx node-notifier-cli -t 'Done' -m 'npm modules reinstalled' -s Glass -i https://cdn.rawgit.com/npm/logos/31945b5c/npm%20square/n-64.png"
alias yarn-reset="rm -rf node_modules && rm -f yarn.lock && yarn && npx node-notifier-cli -t 'Done' -m 'npm modules reinstalled' -s Glass -i https://cdn.rawgit.com/yarnpkg/assets/ab1fa0d4/yarn-kitten-circle.png"
@mischah
mischah / keybindings.json
Last active December 11, 2020 10:06
Current visual studio code settings
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "cmd+shift+t", "command": "workbench.action.terminal.toggleTerminal" },
{ "key": "cmd+shift+7", "command": "editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly" },
{ "key": "cmd+alt+shift+7", "command": "editor.action.blockComment",
"when": "editorFocus" },
{ "key": "ctrl+s", "command": "workbench.action.toggleSidebarVisibility" }
]
@mischah
mischah / .gitattributes
Last active June 29, 2017 08:17
.gitattributes file containing binary file extensions based on https://github.com/sindresorhus/binary-extensions
*.3ds filter=lfs diff=lfs merge=lfs -text
*.3g2 filter=lfs diff=lfs merge=lfs -text
*.3gp filter=lfs diff=lfs merge=lfs -text
*.7z filter=lfs diff=lfs merge=lfs -text
*.a filter=lfs diff=lfs merge=lfs -text
*.aac filter=lfs diff=lfs merge=lfs -text
*.adp filter=lfs diff=lfs merge=lfs -text
*.ai filter=lfs diff=lfs merge=lfs -text
*.aif filter=lfs diff=lfs merge=lfs -text
*.aiff filter=lfs diff=lfs merge=lfs -text
@mischah
mischah / config.cson
Last active November 23, 2016 14:04
Current Atom settings
"*":
"atom-beautify":
general:
analytics: false
js: {}
core:
disabledPackages: [
"minimap-highlight-selected"
"minimap"
"atom-ternjs"

One kata a day keeps ES5 away ✌️

@mischah
mischah / Preferences.sublime-settings
Created August 19, 2015 21:41
My Sublime User Settings
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",
@mischah
mischah / dabblet.css
Created January 30, 2015 07:49
Simple folded corners
/**
* Simple folded corners
*/
div {
background: yellowgreen; /* fallback */
padding: 1em;
width: 12em;
@mischah
mischah / README.md
Created July 18, 2014 00:05
The power of moment.js

#The power of Moment.js

Use case:

  • start date: current day + 2 days
  • end date: current day + 7 days
  • default date: current day + 2 days
  • disabled dates: Sundays within the range of start date to end date