Skip to content

Instantly share code, notes, and snippets.

View vlvagerviwager's full-sized avatar

a̴͖͑̽̇ ̶̱̰̦͐̃v̴͈̅͗ị̶̏̉̅l̴̤̘̤͝l̸͇̅͘a̴̖̙͑ğ̶̝̓͠ę̸̨̀͆r̷̪̐͊̅ vlvagerviwager

  • Ireland
View GitHub Profile
@sarthology
sarthology / regexCheatsheet.js
Created January 10, 2019 07:54
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@bvanderlaan
bvanderlaan / mochaInCoderPad.md
Created September 6, 2018 00:25
How to run Mocha in CoderPad

When using CoderPad to write code in the browser, say your on the go and just need to write some code, and that code happens to be JavaScript and you want to run a Mocha test here is what you need to do:

'use strict';

const { expect } = require('chai');
const Mocha = require('mocha');
const mocha = new Mocha({ui: 'bdd'});

// CODE ///////////////
@henfiber
henfiber / KB-Buying-guide-EU.md
Last active April 26, 2024 13:35
Buying keyboards and keyboard components from EU

Europe

  • SkinFlint : Price comparison site which has some nice filtering options per switch type etc. Searches for offers in UK, Germany, Poland and Austria
  • mykeyboard.eu : Keyboards, keycaps and accessories. Based in Belgium.
  • candykeys.com : European Store selling Vortex, Leopold, KBP, Anne Pro keyboards, keycap sets and components (ISO + ANSI). Based in Germany, ships to EU.
  • falba.tech : custom wooden bamboo cases, and some acrylic and carbon ones. Switch packs (65 browns at 48EUR). Other parts for the GH60, Atreus, ErgoDox. Also Microcontrollers, diodes, leds etc.
  • 42keebs.eu - Mostly PCBs, tools and accessories. Located in Czech Republic.
  • KEYGEM : Switches, Keycaps, lubes, cables, DIY kits and deskmats. Based in Germany, ships to the EU and worldwide.
  • [Eloquent Clicks - Custom Mechanical Keyboard Store](https://www.eloquen
@sharepointoscar
sharepointoscar / minikubedelete
Last active November 25, 2023 18:47
Minikube - Delete all pods from default namespace
# delete all pods
kubectl delete --all pods --namespace=default
# deete all deployments
kubectl delete --all deployments --namespace=default
# delete all services
kubectl delete --all services --namespace=default

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@paitonic
paitonic / expressjs-api-test-with-jasmine-and-request.md
Last active April 19, 2021 14:16
ExpressJS - API Tests with Jasmine and request

ExpressJS - API Tests with Jasmine and request

What am I trying to solve

I was trying to solve an issue with starting the ExpressJS server before each single test and closing it after each test completes, just to make sure each test is running under the same conditions.

Here is the error I ran into while trying to run the tests

$ ./node_modules/jasmine/bin/jasmine.js
Started
started
@Atlas7
Atlas7 / coderpad_tdd_test_suites.js
Last active April 25, 2021 23:02
CoderPad - Mocha Chai Assert TDD Test Suite
// ***** Requirements
// Implement function sequence, which returns new n-size Array filled according to pattern.
//
// pattern may be:
// - a function that takes two: (element, index), one: (element) or any arguments (similar to map function), then filled running this function, in other words: function describes sequence,
// - number, string or any other object, then filled by copying, this object n-times.
//
// ****** Solution
@nolanlawson
nolanlawson / why_we_dropped_lerna_from_pouchdb.md
Last active December 13, 2023 10:56
Why we dropped Lerna from PouchDB

Why we dropped Lerna from PouchDB

We dropped Lerna from our monorepo architecture in PouchDB 6.0.0. I got a question about this from @reconbot, so I thought I'd explain our reasoning.

First off, I don't want this post to be read as "Lerna sucks, don't use Lerna." We started out using Lerna, but eventually outgrew it because we wrote our own custom thing. Lerna is still a great idea if you're getting started with monorepos (monorepi?).

Backstory:

@yang-wei
yang-wei / destructuring.md
Last active February 20, 2024 04:40
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a