This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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('/')) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc game.c -Llib -Wl,-rpath,lib -lraylib -Iinclude |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
libsdl2-2.0-0 libsdl2-dev libsdl2-image-2.0-0 libsdl2-image-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.purge 'git fetch -p && for branch in `git branch -vv --no-color | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let quicksort = (arr) => { | |
quicksortHelper(arr, 0, arr.length - 1) | |
} | |
let quicksortHelper = (arr, first, last) => { | |
if(first < last){ | |
let p = partition(arr, first, last) | |
quicksortHelper(arr, first, p - 1) | |
quicksortHelper(arr, p + 1, last) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let binarySearch = (arr, left, right, searchValue) => { | |
if (left <= right) { | |
middle = Math.floor((left + (right - left) / 2)) | |
if (searchValue === arr[middle]) { | |
return middle | |
} | |
if (searchValue < arr[middle]) { | |
return binarySearch(arr, left, middle - 1, searchValue) | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
│ ┌── 8 | |
│ ┌── 6 | |
│ │ └── 5 | |
│ ┌── 5 | |
│ │ │ ┌── 4 | |
│ │ └── 3 | |
│ │ └── 8 | |
└── 2 | |
│ ┌── 5 | |
│ ┌── 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module Module1 | |
Class Node | |
Public Key As Integer | |
Public Left, Right As Node | |
Sub New(Item As Integer) | |
Key = Item | |
Left = Nothing | |
Right = Nothing |