Skip to content

Instantly share code, notes, and snippets.


Ian Gilkes YenHub

View GitHub Profile
YenHub /
Created Mar 31, 2021
Vanilla Javascript Debounce

Vanilla Javascript Debounce

What is debounce?

This is a vanilla JS version of the infamous Debounce function.

Debounce allows you to delay calls to a function in order to prevent spamming.

A good example of it's application would be an event handler whose event could be fired in multiple time in quick succession.

This function can be used to support JavaScript for the BackOffice non-react pages.

YenHub /
Created Mar 31, 2021
Exposing your local environment for mobile testing | ngrok Setup

Exposing your local environment for mobile testing | ngrok Setup

This guide describes the setup process to expose your local (e.g. https://localhost:3000) to the outside web.

This is helpful, for example, when attempting to test and inspect local code changes on a mobile device.


Visit ngrok's website, setup an account & grab the exe

YenHub /
Created Mar 31, 2021
Vmmem Eating All Your Memory??

Vmmem Eating All Your Memory??



Add the following alias to the tail of ~/.bashrc

# Edit .bashrc (Right click to paste, Ctrl+X to save)
YenHub /
Last active Mar 25, 2021
Leet Code | Two Sum Solution

LeetCode | TwoSum


Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.

You may assume that each input would have exactly one solution, and you may not use the same element twice.

You can return the answer in any order.

YenHub / merge-sort.js
Created Mar 24, 2021
Javascript Merge Sort
View merge-sort.js
// For each side of a set of arrays
const mergeArrays = (left, right) => {
// Iterate each 0th value moving the vaues into our sorted array
let sortVals = [];
while(left.length && right.length) {
(left[0] < right[0]) ? sortVals.push(left.shift()) : sortVals.push(right.shift());
// Return sorted array & anything leftover from either side
YenHub / luhns.c
Created Mar 17, 2021
Luhn's Algorithm in C
View luhns.c
#include <stdio.h>
#include <cs50.h>
string cardType;
// Prompt for a valid card number
long getCardNumber(void)
long cardNumber;
cardNumber = get_long("Please enter the card number: ");
YenHub / Fix Local DNS
Last active Mar 10, 2021
Temp Fix: DNS Issues, cannot access ''
View Fix Local DNS

Temporarily Resolve Local DNS Issues

This snippet describes a workaround which can help when you're having issues connecting to a particular resource.

This is of course a temporary work around, however, can certainly get you out of a muddle fast!

For example, if you're unable to get to the nuget host, this guide can help you resolve this (temporarily!)

You can confirm whether you're having DNS issues, if for example, other connectivity otherwise appears fine, and a particular URL or resource will not resolve.

YenHub / websql-example.html
Created Jul 3, 2020 — forked from benpoole/websql-example.html
Javascript & Web SQL example
View websql-example.html
@author Ben Poole,
Example HTML5 code for playing with the local WebKit (Opera too?) SQL database.
<meta charset="UTF-8" />
<title>Winkles Of The World Unite!</title>
YenHub / hyper-v.bat
Last active Feb 12, 2020
Toggle Hyper-V
View hyper-v.bat
@Echo off
setlocal EnableDelayedExpansion
set 1=auto
set 2=off
set 3=exit
echo " __ __ __ __ ";
echo " / | / | / | / | ";
echo " $$ | $$ | __ __ ______ ______ ______ $$ | $$ | ";
echo " $$ |__$$ |/ | / | / \ / \ / \ ______ $$ | $$ | ";
YenHub /
Created Sep 27, 2019 — forked from mdang/
Lesson: SDLC

The Software Development Life Cycle

Learning Objectives


  • Explain what SDLC is and why we use it
  • Provide a general overview of what "Agile" means and compare it to Waterfall
  • Explain what SCRUM is, and how it relates to agile.
  • Describe the process of requirements gathering.
  • Explain what a user story is, and what specific points it should include.