Skip to content

Instantly share code, notes, and snippets.

View HallexCosta's full-sized avatar
:octocat:
Learning on-demand!

Hállex da Silva Costa HallexCosta

:octocat:
Learning on-demand!
View GitHub Profile

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@HallexCosta
HallexCosta / Merge.cs
Last active March 22, 2021 19:10
MergeSort with C#
public class Merge {
public static int[] data;
public static void sort(int[] a, int lb, int ub) {
if (lb < ub) {
int mid = (lb + ub) / 2;
Merge.sort(a, lb, mid);
Merge.sort(a, mid + 1, ub);
Merge.concat(a, lb, mid, ub);
}
@HallexCosta
HallexCosta / Merge.js
Last active March 6, 2021 23:42
Merge Sort Algorithm with Javascript (CommonJS)
class Merge {
static sort(a, lb, ub) {
if (lb < ub) {
const mid = parseInt((lb + ub) / 2)
Merge.sort(a, lb, mid)
Merge.sort(a, mid + 1, ub)
Merge.concat(a, lb, mid, ub)
}
}
@HallexCosta
HallexCosta / Merge.php
Last active March 4, 2021 21:12
MergeSort Algorithm with PHP
<?php
/**
* class Merge
*/
class Merge {
/**
* sort
* @param array &$a (Pointer)
* @param int $lb
@HallexCosta
HallexCosta / README.md
Last active December 21, 2021 19:08
Ayu Theme for wsltty/mintty
  • Ayu Mirage Dark
  • Ayu Mirage Light
  • Ayu Dark
  • Ayu Light

Ayu Mirage Dark ayu-mirage-dark

Ayu Mirage Light ayu-mirage-light

@HallexCosta
HallexCosta / fix-tmux-terminal-overrides-bugs.md
Last active May 5, 2021 05:06
How to active 256 color in Tmux with Neovim
# Init a new instance tmux
$ tmux

# Override xterm-256color:Tc for active true colors of TMUX
$ tmux set-option -ga terminal-overrides ",xterm-256color:Tc"

# Disconnect of session (without exit)
$ tmux detach
@HallexCosta
HallexCosta / profiles.json
Created February 11, 2021 13:51 — forked from joshtynjala/profiles.json
Ayu color schemes for Windows Terminal
{
"schemes" :
[
{
"background" : "#fafafa",
"black" : "#000000",
"blue" : "#3199e1",
"brightBlack" : "#686868",
"brightBlue" : "#399ee6",
"brightCyan" : "#4cbf99",
@HallexCosta
HallexCosta / tmux-cheatsheet.markdown
Created February 9, 2021 16:27 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@HallexCosta
HallexCosta / shortcutkeys.txt
Created February 7, 2021 06:08
Tmux shortcut keys
Ctrl+b c Create a new window (with shell)
Ctrl+b w Choose window from a list
Ctrl+b 0 Switch to window 0 (by number )
Ctrl+b , Rename the current window
Ctrl+b % Split current pane horizontally into two panes
Ctrl+b " Split current pane vertically into two panes
Ctrl+b o Go to the next pane
Ctrl+b ; Toggle between the current and previous pane
Ctrl+b x Close the current pane
@HallexCosta
HallexCosta / Either.ts
Last active February 5, 2021 18:52
Error Pattern with Either
export type Either<L, A> = Left<L, A> | Right<L, A>
export class Left<L, A> {
readonly value: L
constructor (value: L) {
this.value = value
}
isLeft (): this is Left<L, A> {