Skip to content

Instantly share code, notes, and snippets.

View valdenidelgado's full-sized avatar
🏠
Working from home

Valdeni Delgado valdenidelgado

🏠
Working from home
  • ClickBus
View GitHub Profile
@valdenidelgado
valdenidelgado / Efficient Bad Word Filter
Created August 22, 2023 21:26 — forked from PimDeWitte/Efficient Bad Word Filter
Simple profanity filter written in Java for efficient comparison. Runtime grows based on string input, not list size.
static Map<String, String[]> words = new HashMap<>();
static int largestWordLength = 0;
public static void loadConfigs() {
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(new URL("https://docs.google.com/spreadsheets/d/1hIEi2YG3ydav1E06Bzf2mQbGZ12kh2fe4ISgLg_UBuM/export?format=csv").openConnection().getInputStream()));
String line = "";
int counter = 0;
while((line = reader.readLine()) != null) {
@valdenidelgado
valdenidelgado / actionlist.vim
Created July 1, 2023 22:32 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@valdenidelgado
valdenidelgado / seperate_ssh_keys.md
Created April 27, 2023 15:03 — forked from thebashpotato/seperate_ssh_keys.md
Setup seperate ssh keys for personal and work

Create your ~/.gitconfig

Here I use ~/Development/Github as my workspace, and create two sub folders for work and personal Note that if you want to use something different that ~/Development/Github, you must changed the paths in .gitconfig to match

# Contents of ~/.gitconfig
[includeIf "gitdir:~/Development/Github/personal/"]
    path = ~/Development/Github/personal/.gitconfig.pers
[includeIf "gitdir:~/Development/Github/work/"]
@valdenidelgado
valdenidelgado / keybindings.json
Created April 6, 2023 23:06 — forked from MasoodGit/keybindings.json
vscode vim keybindings and settings.json
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+h",
"command": "workbench.action.focusLeftGroup",
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'"
},
{
"key": "ctrl+l",
"command": "workbench.action.focusRightGroup",
set ignorecase
set smartcase
set scrolloff=3 " 3 lines above/below cursor when scrolling
" Emulated Plugins
set surround
" set easymotion
set NERDTree
" Copy to system clipboard as well
@valdenidelgado
valdenidelgado / ambiente-dev-python.md
Created August 8, 2022 23:50 — forked from robsonsilv4/ambiente-dev-python.md
💻 Ambiente de Desenvolvimento Python para Arch Linux e Ubuntu 18.04

Ambiente de Desenvolvimento Python para Arch Linux e Ubuntu

Passo a passo para te ajudar a montar o seu ambiente completo de desenvolvimento Python, utilizando como base o Arch Linux, Ubuntu 18.04.x e derivados.

Arch Linux

Primeiro, sincronize os repositórios e atualize o sistema utilizando o seguinte comando:

sudo pacman -Syyu

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@valdenidelgado
valdenidelgado / install-zsh-ubuntu.sh
Created June 19, 2022 16:21 — forked from luizomf/install-zsh-ubuntu.sh
Install ZSH on Ubuntu (Oh-my-zsh)
# ZSH
sudo apt install zsh -y
sudo apt-get install powerline fonts-powerline -y
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
chsh -s /bin/zsh
# REBOOT
# sudo reboot
@valdenidelgado
valdenidelgado / javascript-password-generator.js
Created June 19, 2022 16:21 — forked from luizomf/javascript-password-generator.js
A simple password generator in JavaScript - This is a script I needed - I don't think this will be of any help, but here it is....
/*
A regex to validate all options
/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!-/:-@[-_{-~]).*$/;
*/
const random = (min = 0, max = 10) => {
const { random, floor } = Math;
return floor(random() * (max - min) + min);
};
@valdenidelgado
valdenidelgado / rename_user_linux.sh
Created June 19, 2022 16:21 — forked from luizomf/rename_user_linux.sh
Rename a user on Linux - Ubuntu - Change username, user id, group id and user home directory.
# Change username from old-username to new-username
sudo usermod -l old-username new-username
# You may also want to rename the user group name
# Change old-group-name to new-group-name
sudo groupmod --new-name old-group-name new-group-name
# If you need to change the user id for some reason
# Change user id for user new-username to 1001
sudo usermod -u 1001 new-username