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
@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
@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 ///////////////
@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
@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:

@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"
@henriquemoody
henriquemoody / http-status-codes.php
Last active January 26, 2024 10:29
List of HTTP status codes in PHP
<?php
/**
* Content from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
*
* You may also want a list of unofficial codes:
*
* 103 => 'Checkpoint',
* 218 => 'This is fine', // Apache Web Server
* 419 => 'Page Expired', // Laravel Framework
@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"))
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream

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