Skip to content

Instantly share code, notes, and snippets.

View YenHub's full-sized avatar
🎯
Focusing

Ian Gilkes YenHub

🎯
Focusing
View GitHub Profile
@YenHub
YenHub / .git-commit-template
Created March 28, 2019 15:30 — forked from zakkak/.git-commit-template
This commit message template that helps you write great commit messages and enforce it across your team.
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char)
# |<---- Preferably using up to 50 chars --->|<------------------->|
# Example:
# [feat] Implement automated commit messages
# (Optional) Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# (Optional) Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@YenHub
YenHub / git-feature-workflow.md
Created September 27, 2019 11:42 — forked from blackfalcon/git-feature-workflow.md
Git basics - a general workflow

There are many Git workflows out there, I heavily suggest also reading the atlassian.com [Git Workflow][article] article as there is more detail then presented here.

The two prevailing workflows are [Gitflow][gitflow] and [feature branches][feature]. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited.

When using Bash in the command line, it leaves a bit to be desired when it comes to awareness of state. I would suggest following these instructions on [setting up GIT Bash autocompletion][git-auto].

Basic branching

When working with a centralized workflow the concepts are simple, master represented the official history and is always deployable. With each now scope of work, aka feature, the developer is to create a new branch. For clarity, make sure to use descriptive names like transaction-fail-message or github-oauth for your branches.

@YenHub
YenHub / SDLC.md
Created September 27, 2019 14:09 — forked from mdang/SDLC.md
Lesson: SDLC

The Software Development Life Cycle

Learning Objectives

Conceptual

  • 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.
@YenHub
YenHub / hyper-v.bat
Last active February 12, 2020 19:35
Toggle Hyper-V
@Echo off
setlocal EnableDelayedExpansion
set 1=auto
set 2=off
set 3=exit
Echo/
echo " __ __ __ __ ";
echo " / | / | / | / | ";
echo " $$ | $$ | __ __ ______ ______ ______ $$ | $$ | ";
echo " $$ |__$$ |/ | / | / \ / \ / \ ______ $$ | $$ | ";
@YenHub
YenHub / websql-example.html
Created July 3, 2020 08:14 — forked from benpoole/websql-example.html
Javascript & Web SQL example
<!DOCTYPE HTML>
<html>
<!--
@author Ben Poole, http://benpoole.com
Example HTML5 code for playing with the local WebKit (Opera too?) SQL database.
@see http://benpoole.com/weblog/201106222227
-->
<head>
<meta charset="UTF-8" />
<title>Winkles Of The World Unite!</title>
@YenHub
YenHub / Fix Local DNS Issues.md
Last active March 10, 2021 17:13
Temp Fix: DNS Issues, cannot access 'https://some-url.com'

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
YenHub / luhns.c
Created March 17, 2021 18:21
Luhn's Algorithm in 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
YenHub / merge-sort.js
Created March 24, 2021 20:31
Javascript Merge Sort
// 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
YenHub / twoSum.md
Last active March 25, 2021 22:24
Leet Code | Two Sum Solution

LeetCode | TwoSum

Difficulty: ✅☑☑☑☑

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
YenHub / vmmem.md
Created March 31, 2021 21:42
Vmmem Eating All Your Memory??

Vmmem Eating All Your Memory??

Simples...

WORKAROUND:

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

# Edit .bashrc (Right click to paste, Ctrl+X to save)