Skip to content

Instantly share code, notes, and snippets.

View Flexicon's full-sized avatar
👻
just vibing

Mike Repeć Flexicon

👻
just vibing
View GitHub Profile
@Flexicon
Flexicon / async.js
Last active March 2, 2023 17:03
Showing how to handle thrown errors in testing asynchronous code
async function wontThrowErr() {
return 'ok';
}
async function mightThrowErr() {
throw new Error('oops');
}
module.exports = {
mightThrowErr,
@Flexicon
Flexicon / pass-slots.md
Created April 28, 2020 11:23 — forked from loilo/pass-slots.md
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {

@Flexicon
Flexicon / gist:553186aea385d04205af12a94876a0ba
Created September 22, 2018 15:42
Lazy load NVM (from reddit user sscotth)
declare -a NODE_GLOBALS=(`find ~/.nvm/versions/node -maxdepth 3 -type l -wholename '*/bin/*' | xargs -n1 basename | sort | uniq`)
NODE_GLOBALS+=("node")
NODE_GLOBALS+=("nvm")
load_nvm () {
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
}
@Flexicon
Flexicon / git-deployment.md
Created March 2, 2018 20:00 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.