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
# Use TAB to select entries to delete | |
# Run `fc -R` to reload history file from a current shell. | |
alias hfzf='history -w; cat ~/.zsh_history | fzf -m > /tmp/to_remove; grep -vxFf /tmp/to_remove ~/.zsh_history > ~/.new_zsh_history; mv ~/.new_zsh_history ~/.zsh_history; rm /tmp/to_remove; history -r' |
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
#!/bin/bash | |
while "$@"; do :; 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
CompileFlags: | |
Add: -ferror-limit=0 | |
InlayHints: | |
Designators: Yes | |
Enabled: Yes | |
ParameterNames: Yes | |
DeducedTypes: Yes | |
Diagnostics: |
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
set-option -g default-shell $SHELL | |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color |
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
template <typename T> | |
class Queue { | |
private: | |
using size_type = size_t; | |
T* arr; | |
size_type head; | |
size_type tail; | |
size_type _size; | |
size_type _capacity; | |
static constexpr size_type DEFAULT_CAP = 4; |
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
template <typename T1, typename T2> | |
class Pair{ | |
public: | |
T1 first; | |
T2 second; | |
constexpr Pair() : first(T1()), second(T2()) {}; | |
Pair(const T1& f, const T2& s) : first(f), second(s) {}; |
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
alias ga="git add" | |
alias gaa="git add --all | |
" | |
alias gb="git branch" | |
alias gba="git branch -a" | |
# Delete all local branches except for the current & master | |
alias gbd="git branch | grep -v '$(git branch --show-current)\|master' | xargs git branch -D" | |
alias gc="git commit" | |
alias gca="git commit --amend" |
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
#include <cstddef> | |
#include <utility> | |
template <typename T> | |
class Vector { | |
private: | |
using size_type = size_t; | |
T* arr; | |
size_type _size; | |
size_type _capacity; |
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
template <typename T> | |
class Heap { | |
private: | |
using size_type = size_t; | |
T* arr; | |
size_type _size; | |
size_type _capacity; | |
bool is_max_heap; | |
static constexpr size_type DEFAULT_CAP = 32; |
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
template <typename T> | |
void swap(T& a, T& b) { | |
T tmp = a; | |
a = b; | |
b = tmp; | |
} | |
/* | |
* Sort all elements in arr[]; range of closed interval [left, right]. | |
*/ |
NewerOlder