Skip to content

Instantly share code, notes, and snippets.

:octocat:
afk // brb

Michael Kühnel mischah

:octocat:
afk // brb
View GitHub Profile
@mischah
mischah / z.md
Last active May 24, 2020
Installing und initializing z (https://github.com/rupa/z) with help of Homebrew.
View z.md

#The power of z

Do you spend lots of time doing things like this?

cd this/is/the/path/that/i/want/so/i/type/it/all/out/to/get/whereiwant

With z, you could just do this:

@mischah
mischah / delay.js
Created Apr 14, 2019
Promisified setTimeout
View delay.js
// Promisified setTimeout
const delay = (duration = 0) =>
new Promise(resolve =>
setTimeout(() => {
resolve();
}, duration)
);
// Usage
async function myFunction() {
@mischah
mischah / footer.html
Last active Jul 4, 2018
BEM like CSS Naming Conventions
View footer.html
@mischah
mischah / How to.md
Last active May 4, 2018
VSCode Settings for formatting using Prettier
View How to.md

How to setup Prettier to manually format your code

  1. Install Prettier
  2. Update User Settings
    {
      "editor.formatOnPaste": false,
      "editor.formatOnSave": false,
    }
@mischah
mischah / jquery.fullScreenHelper.js
Last active Apr 30, 2018
Helper methods to handle vendor specific methods provided by the HTML5 fullscreen API for the web platform. See readme.md for details.
View jquery.fullScreenHelper.js
/**
* Checking the browsers fullscreen ability. Returns vendor specific methods.
* @return {Object} return.requestMethod The browser specific requestFullScreen method
* @return {Object} return.cancelMethod The browser specific cancelFullScreen method
*/
var checkFullScreenAbility = function() {
var fullScreenAbility = {},
requestMethod = document.body.requestFullScreen ||
document.body.webkitRequestFullScreen ||
document.body.mozRequestFullScreen ||
@mischah
mischah / .bashrc || .zshrc
Last active Nov 30, 2017
Aliases to trash node_modules and lockfiles via Yarn and npm
View .bashrc || .zshrc
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 / .gitattributes
Last active Jun 29, 2017
.gitattributes file containing binary file extensions based on https://github.com/sindresorhus/binary-extensions
View .gitattributes
*.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 / keybindings.json
Last active Dec 6, 2016
Current visual studio code settings
View keybindings.json
// 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 / config.cson
Last active Nov 23, 2016
Current Atom settings
View config.cson
"*":
"atom-beautify":
general:
analytics: false
js: {}
core:
disabledPackages: [
"minimap-highlight-selected"
"minimap"
"atom-ternjs"
You can’t perform that action at this time.