Skip to content

Instantly share code, notes, and snippets.

@ayoola-moore
ayoola-moore / gist:a476f0288142ea35456bf8aa546cc2e9
Last active February 14, 2021 08:22
gist alias - paste command into terminal
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
@ayoola-moore
ayoola-moore / keyreplacement.ahk
Created February 11, 2021 20:36
windows cap to esc and cntrl + q for exit
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
CapsLock::Escape
Escape::CapsLock
^q::Send !{F4}
return
class Solution {
private class IntervalComparator implements Comparator<int[]> {
@Override
public int compare(int[] a, int[] b) {
return a[0] < b[0] ? -1 : a[0] == b[0] ? 0 : 1;
}
}
public int[][] merge(int[][] intervals) {
Collections.sort(Arrays.asList(intervals), new IntervalComparator());
@ayoola-moore
ayoola-moore / bash config
Created April 23, 2020 18:54
bash config... Add to .bashrc
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
echo "[${BRANCH}${STAT}]"
else
echo ""
fi
@ayoola-moore
ayoola-moore / Readme.md
Created August 22, 2019 06:52
Documentation template

Rezdy

Notable tech stack includes the following

  1. React
  2. Redux (redux-saga)
  3. Flow
  4. Jest
  5. Storybook
  6. Sass
@ayoola-moore
ayoola-moore / README-Template.md
Created August 14, 2019 04:36 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@ayoola-moore
ayoola-moore / docker-help.md
Created April 16, 2019 09:30 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@ayoola-moore
ayoola-moore / flatten
Created April 8, 2019 05:39
simple code to flatten a nested array in Javascript
function flattenArray2(arr = []) {
return arr.reduce(function(flat, toFlatten) {
return flat.concat(
Array.isArray(toFlatten) ? flattenArray2(toFlatten) : toFlatten
);
}, []);
}
console.log(flattenArray2([[2, 5], ["b", "c", ["d"]], [5], 6]))
@ayoola-moore
ayoola-moore / scp-cheatsheet.md
Created December 17, 2018 04:36 — forked from dehamzah/scp-cheatsheet.md
SCP Cheatsheet

Basic Syntax

$ scp source_file_path destination_file_path

Uploading

Single file

@ayoola-moore
ayoola-moore / codility_solutions.txt
Created December 10, 2018 20:46 — forked from lalkmim/codility_solutions.txt
Codility Solutions in JavaScript
Lesson 1 - Iterations
- BinaryGap - https://codility.com/demo/results/trainingU2FQPQ-7Y4/
Lesson 2 - Arrays
- OddOccurrencesInArray - https://codility.com/demo/results/trainingFN5RVT-XQ4/
- CyclicRotation - https://codility.com/demo/results/trainingSH2W5R-RP5/
Lesson 3 - Time Complexity
- FrogJmp - https://codility.com/demo/results/training6KKWUD-BXJ/
- PermMissingElem - https://codility.com/demo/results/training58W4YJ-VHA/