Skip to content

Instantly share code, notes, and snippets.

View kevinah95's full-sized avatar
🇨🇷

Kevin A. Hernández Rostrán kevinah95

🇨🇷
View GitHub Profile
def hourglassSum(arr):
results = []
max_value = 0
for j in range(4):
sums = []
for i in range(5):
sum_01 = sum(arr[j][i : 3 + i])
sum_02 = arr[j + 1][i + 1]
sum_03 = sum(arr[j + 2][i : 3 + i])
sums.append(sum_01 + sum_02 + sum_03)
@kevinah95
kevinah95 / git-commit-style-guide.md
Created February 19, 2023 05:57 — forked from ericavonb/git-commit-style-guide.md
Git Commit Style Guide

Git Commit Style Guide

Inspiration: Deis Commit Style Guide

I often quote Deis in sections below.

Motivation

It makes going back and reading commits easier. It also allows you to spend less time thinking about what your commit message should be.

@kevinah95
kevinah95 / Python.md
Last active September 12, 2024 18:45
@kevinah95
kevinah95 / work-with-multiple-github-accounts.md
Created January 12, 2023 01:25 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
akamud.vscode-theme-onelight
AkashChikane.List2Array
andys8.jest-snippets
atlassian.atlascode
bierner.color-info
burkeholland.simple-react-snippets
dericcain.feather
dsznajder.es7-react-js-snippets
emilast.LogFileHighlighter
Equinusocio.vsc-community-material-theme
function print (path: any, layer: any) {
if (layer.route) {
layer.route.stack.forEach(print.bind(null, path.concat(split(layer.route.path))))
} else if (layer.name === 'router' && layer.handle.stack) {
layer.handle.stack.forEach(print.bind(null, path.concat(split(layer.regexp))))
} else if (layer.method) {
console.log('%s /%s',
layer.method.toUpperCase(),
path.concat(split(layer.regexp)).filter(Boolean).join('/'))
}
@kevinah95
kevinah95 / remove_no_longer_on_remote.sh
Last active July 24, 2020 15:59
Remove tracking branches no longer on remote.
git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do git branch -D $branch; done
# More info: https://stackoverflow.com/a/33548037/4752488
#
# rgl layout text file (v2.1) - raygui layout file generated using rGuiLayout
#
# Number of controls: 19
#
# Ref. window: r <x> <y> <width> <height>
# Anchor info: a <id> <name> <posx> <posy> <enabled>
# Control info: c <id> <type> <name> <rectangle> <anchor_id> <text>
#
r 0 0 -1 -1
@kevinah95
kevinah95 / run.sh
Created June 10, 2020 17:17
Run ralib local linking
cc game.c -Llib -Wl,-rpath,lib -lraylib -Iinclude