Skip to content

Instantly share code, notes, and snippets.

View Santosl2's full-sized avatar
🎯
Focusing

Matheus Filype Santosl2

🎯
Focusing
View GitHub Profile
@Santosl2
Santosl2 / .bashrc
Last active July 1, 2025 19:41
Fish and Bash Aliases
## Carrega automaticamente o .nvmrc
load-nvmrc() {
local nvmrc_path
nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version
nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" = "N/A" ]; then
# migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh
# Aliases
alias g='git'
#compdef g=git
alias gst='git status'
#compdef _git gst=git-status
alias gd='git diff'
#compdef _git gd=git-diff
alias gdc='git diff --cached'
@Santosl2
Santosl2 / cache.js
Created February 17, 2023 16:53
Simple Cache Class
export class CacheMap {
private cache: Map<string, Cache>;
private expiration_time: number; // Tempo de expiração em segundos
constructor(expiration?: number) {
this.cache = new Map();
this.expiration_time = expiration || 60;
}
import rootReducer from '../my-rootreducer-dir';

function renderWithRedux(ui, { initialState, store = createStore(rootReducer, initialState) } = {}, renderFn = render) {
  const obj = {
    ...renderFn(<Provider store={store}>{ui}</Provider>),
    store,
  };
  obj.rerenderWithRedux = (el, nextState) => {
@Santosl2
Santosl2 / keybindings,json
Last active April 28, 2022 03:09
My VSCode Configs
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+d",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+alt+down",
"command": "-editor.action.copyLinesDownAction",