Skip to content

Instantly share code, notes, and snippets.

View richxcame's full-sized avatar
🎯
Focusing

Baygeldi Cholukov richxcame

🎯
Focusing
View GitHub Profile
@richxcame
richxcame / git.md
Last active May 17, 2022 17:37
Get cheat sheet

Config username for git

git config --global user.name "John Doe"

Config email for git

git config --global user.email [email protected]

Create docs (Default)

swag init

Create docs (Works with gorm.Model/DeletedAt/CreatedAt/UpdatedAt)

swag init --parseDependency --parseInternal
@richxcame
richxcame / Postgres.md
Created February 5, 2022 23:47
Postgres cheat sheet

Postgres

Installation for OSX with Homebrew

brew install postgresql

Start postgres

brew services start postgresql

Bash script for docker

Give permission to booking.sh

sudo chmod +x scriptname.sh

booking.sh

#!/bin/bash
@richxcame
richxcame / Docker.md
Last active January 13, 2022 17:41
Docker cheat sheet

Docker

Make sure that docker installed on your machine

Create Dockerfile file in root of project

# Dockerfile

# This is image with version that you need.
FROM node:16
@richxcame
richxcame / SSH.md
Last active December 29, 2021 18:57
Connect with ssh without typing password

How to ssh to a remote server without typing your password

# The hostname of your remote server.
[email protected]

# Create this folder if it does not exist: ~/.ssh
mkdir ~/.ssh

# Set the correct permissions (required)
@richxcame
richxcame / tmux.md
Last active December 29, 2021 18:58
Tmux custom key binding

Key bindings to tmux (my config file for tmux)

Create .tmux.conf file in root folder of user

# remap prefix from C-b to C-a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
[user]
name = Baygeldi Cholukov
email = [email protected]
[alias]
a = add
al = add .
#############
b = branch
ba = branch --all
bd = branch -d
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required

If .DS_Store was never added to your git repository, simply add it to your .gitignore file.

If you don't have one, create a file called

.gitignore

In your the root directory of your app and simply write