Skip to content

Instantly share code, notes, and snippets.

@dewdad
dewdad / watch vuex deep state changes.js
Created June 19, 2019 11:50
Watch nested data from vuex store state
computed:{
storeInvalidated: get('view/invalidateStore')
},
watch: {
'storeInvalidated.meetings': {
handler(newVal, oldVal) {
if (newVal && newVal !== oldVal) {
logger.debug('meetingsInvalidated', { newVal, oldVal });
// this.initializeMeetings();
}
@dewdad
dewdad / FiddlerScript.js
Created July 14, 2019 19:39
FiddlerScript
import System;
import System.Windows.Forms;
import Fiddler;
// INTRODUCTION
//
// Well, hello there!
//
// Don't be scared! :-)
//
@dewdad
dewdad / es6-element-ready.js
Created July 14, 2019 20:14 — forked from jwilson8767/es6-element-ready.js
Wait for an element to exist. ES6, Promise, MutationObserver
/**
* Waits for an element satisfying selector to exist, then resolves promise with the element.
* Useful for resolving race conditions.
*
* @param selector
* @returns {Promise}
*/
export function elementReady(selector) {
return new Promise((resolve, reject) => {
let el = document.querySelector(selector);
@dewdad
dewdad / How I migrated from multi-repository to mono-repository in one day.html
Last active August 5, 2019 06:22
How I migrated from multi-repository to mono-repository in one day
How I migrated from multi-repository to mono-repository in one day
We had a lot of repositories for different services. There are 20K+ commits in 15+ repositories. Each repository has its own Dockerfile, tests, lint rules, etc.
Turns out, it’s hard to maintain, especially when you have dependent repositories across. I.e. you have repository api that is using a package from another repository, let’s say commons. If you publish an update in commons, you need to go through all the dependent repositories and update commons there.
Now, just imagine how long it takes, to make a clone of each repository, make an update there and push changes back to remote. It’s hard to say for me, but these kinds of updates were leading to half a day work just for updating the changes in other repositories. Therefore, we allocated resources for changing that.
But, before I started migration to a mono repository, I spent some time investigating the pros and cons of other alternatives.
@dewdad
dewdad / monorepo-tool-comparison.md
Created August 8, 2019 07:35 — forked from morewry/monorepo-tool-comparison.md
Comparison of Monorepo Tools For Web Client / Front End Projects (That Probably Use HTML, CSS, and JS)

Mono Repository Tool Comparison

For Web Client / Front End Projects

(That Probably Use HTML, CSS, and JS)

I made a list of 20 things I might want out of a monorepo tool for a Design System to use as a basis for comparing some of the options including Lerna, Northbrook, and Rush.

⚠️ Northbrook's author says the project is pretty dead and now uses Lerna.

Qualifications Wanted

#################
# Initial Setup #
#################
#The command to run, built from the raw link of this gist
#START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/dewdad/56f9818c123ad984afbcfba90eb18359/raw/1d094bd48f488085807babd71456db9794e64ea9/RegUserBoxstarter.ps1
#As described here: http://boxstarter.org/Learn/WebLauncher
#########################################
@dewdad
dewdad / README.md
Last active September 23, 2019 13:25
SVG Sprite in Vue CLI projects
@dewdad
dewdad / generate-ssh-key.sh
Created May 12, 2020 08:35 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa
@dewdad
dewdad / basic-dev.ps1
Last active July 1, 2020 21:52 — forked from flcdrg/1-boxstarter-bare-v4.ps1
My BoxStarter Scripts
# SQL Server - do this early to avoid issues with newer versions of VC++ 2015 redist
choco install sql-server-2017
choco install sql-server-2017-cumulative-update
choco install sql-server-management-studio
# tools
choco install git
choco install nodejs
choco install tortoisegit
choco install vscode
@dewdad
dewdad / Signupform.vue
Created August 23, 2020 16:50 — forked from andreas-it-dev/Signupform.vue
vuetify made sign up form - inspired by https://www.youtube.com/watch?v=jWoy_LQydvk
<template>
<v-container id="signinup-form" class="fill-height">
<Notification
:message="snackbarMessage"
:snackbar="snackbar"
:type="snackbarType"
/>
<v-row align="center" justify="center" no-gutters>
<v-col cols="12" sm="8" md="8" class="">
<v-card class="evelation-12 card">