Skip to content

Instantly share code, notes, and snippets.

View felipekm's full-sized avatar
🦈

Felipe Kautzmann felipekm

🦈
View GitHub Profile
@felipekm
felipekm / git-commit-best-practices.md
Last active June 3, 2022 19:18
Git Commit Best Practices

Git

Git Best Practices

  1. Test all changes before pushing a PR to the remote branch
  2. Squash commits in pr's
  3. Individual contributor's PR's can be Squashed and Merged on github
  4. Name commits intelligently inside yout reposity. They should follow this format (): . I.e., bug(ModuleName): Fixing merchant logos for....

4.1. Change Types:

@felipekm
felipekm / index.html
Created November 10, 2021 00:30
HTML raw file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Title</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="">
@felipekm
felipekm / gist:784d4fbdf950b5882b96086ff233e9d5
Created July 29, 2021 15:56
Fixes sharp npm package installation
# inside your project folder creates the node_modules with sudo and give it permission
sudo mkdir node_modules/
sudo chmod 777 node_modules/
# now you can install the dependencies with no need of '--unsafe-perm' or '--allow-root'
sudo npm i
@felipekm
felipekm / install-go.sh
Last active September 19, 2020 22:50
Installing Go MacOSX
#/bin/sh
# download gvm
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
# include in path (.bashrc, .zshrc)
export PATH=$PATH:$HOME/.gvm/bin
[[ -s "$HOME/.gvm/scripts/gvm" ]] && source "$HOME/.gvm/scripts/gvm"
export GOPATH=$HOME/Go
@felipekm
felipekm / update_nginx.sh
Created July 31, 2020 19:12
how to update nginx
#!/bin/shell
sudo mkdir /etc/nginx-backup/
sudo cp -r /etc/nginx/* /etc/nginx-backup/
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get full-upgrade
sudo nginx -v
@felipekm
felipekm / clear-memory-cache-buffer-swap.sh
Created July 27, 2020 14:31
Linux Clear Cache Shell Script
#!/bin/bash
# Clear PageCache only
sync; echo 1 > /proc/sys/vm/drop_caches
# Clear dentries and inodes
sync; echo 2 > /proc/sys/vm/drop_caches
# Clear PageCache, dentries and inodes
sync; echo 3 > /proc/sys/vm/drop_caches
@felipekm
felipekm / gist:a7b6df8b65f0fdb0414c0ca605f71f4a
Created July 22, 2020 22:35
Install google chrome in ubuntu
sudo apt install gdebi-core wget
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo gdebi google-chrome-stable_current_amd64.deb
@felipekm
felipekm / steps.md
Created July 22, 2020 19:40
Github set ssh keys steps Linux

Generating a new SSH key and adding it to the ssh-agent

ssh-keygen -t rsa -b 4096 -C "your_email@example.com" eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_rsa

Adding a new SSH key to your GitHub account

sudo apt-get install xclip xclip -sel clip &lt; ~/.ssh/id_rsa.pub

@felipekm
felipekm / pm2_rust.md
Last active May 25, 2023 16:12
Use PM2 with RUST

Make a Rust project: cargo init foo

Install PM2:

  1. npm init
  2. npm install pm2

Create a script entry in your package.json to launch pm2:

local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
PROMPT='%{$fg_bold[red]%}HOME - %{$fg_bold[yellow]%}%t - %{$fg_bold[blue]%}%c $(git_prompt_info)% %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_CLEAN=") %{$fg_bold[green]%}✔ "
ZSH_THEME_GIT_PROMPT_DIRTY=") %{$fg_bold[red]%}✘ "
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}("
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"