Skip to content

Instantly share code, notes, and snippets.

View namakurohman93's full-sized avatar
⚔️
grinding hard skills

Arief Rohman namakurohman93

⚔️
grinding hard skills
  • Indonesia
  • 08:55 (UTC +07:00)
View GitHub Profile
@namakurohman93
namakurohman93 / alacritty-tmux-vim_truecolor.md
Created March 21, 2022 12:40 — forked from andersevenrud/alacritty-tmux-vim_truecolor.md
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
bash 24-bit-color.sh
https://github.com/neoclide/coc-pairs
https://github.com/rstacruz/vim-closer
https://github.com/Raimondi/delimitMate
https://github.com/tpope/vim-endwise
https://github.com/jiangmiao/auto-pairs
https://github.com/cohama/lexima.vim
"Chuck this in [a vim runtime]/nerdtree_plugin/gitignore_filter.vim
if exists("loaded_nerdtree_gitignore_filter")
finish
endif
let loaded_nerdtree_gitignore_filter = 1
call NERDTreeAddPathFilter('NERDTreeGitIgnoreFilter')
@namakurohman93
namakurohman93 / .bash_profile
Created February 13, 2022 02:21 — forked from stephenll/.bash_profile
.bash_profile file on Mac OS X
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases.
# Much of this was originally copied from:
# http://natelandau.com/my-mac-osx-bash_profile/
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
@namakurohman93
namakurohman93 / dump-postgresql-database.md
Last active August 27, 2021 12:47
Dump postgresql database
pg_dump database_name > database_name_20160527.sql

Option -U might help you if you use different username

copy the database to whatever you want

psql database_name < database_name_20160527.sql
@namakurohman93
namakurohman93 / commands.md
Last active March 23, 2022 02:16
Easly forget but really helpfull

Easy to forget

list of commands that easly to forget but really helpfull

  • ufw
  • json_pp
  • program that generate output | tee output.log # you want to see the output and at the same time you want to write it to file
@namakurohman93
namakurohman93 / desc.md
Last active June 1, 2021 23:12
interactive rebase then git push -f origin <branch>

Squash your commit

So let say you are working in a project. You made your branch, make a change on the code, commit those code, push it to the repo, then you make a PR and ask your team lead and your team mate to review your changes.
But then you need to made a change again, so you repeat your work progress then you push again. Using this convention, you end up with a lot of commit.
What if you want to squash them into one commit? But wait, you already make a PR right?
So here is the steps:

  • make sure your code is approved
  • update your code with development branch by merge it or rebase it
  • run git rebase -i HEAD~
@namakurohman93
namakurohman93 / nginxproxy.md
Created April 13, 2021 13:59 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@namakurohman93
namakurohman93 / git_setup.md
Created February 28, 2021 23:58 — forked from hoyin258/git_setup.md
VPS Git Server Setup

Create repository

VPS:

su
cd /var/www/
mkdir site
cd /var
mkdir repo &amp;&amp; cd repo