Skip to content

Instantly share code, notes, and snippets.

View Big-Vi's full-sized avatar
💥

Vignesh Murugan Big-Vi

💥
View GitHub Profile
@Big-Vi
Big-Vi / README.md
Created September 27, 2023 23:40
Deploying LimeSurvey on Ubuntu using Nginx, MySQL & Certbot

Install Nginx

sudo apt update
sudo apt install nginx

Install MySQL and secure it

sudo apt install mysql-server
sudo mysql_secure_installation

Create MySQL database and user

sudo mysql -u root -p

@Big-Vi
Big-Vi / Makefile
Created July 6, 2023 02:37 — forked from alexedwards/Makefile
Makefile targets for working with sqlite
## db/connect: create to the local database
.PHONY: db/connect
db/connect:
sqlite3 db.sqlite
## db/migrations/new name=$1: create a new migration
.PHONY: db/migrations/new
db/migrations/new:
go run -tags 'sqlite3' github.com/golang-migrate/migrate/v4/cmd/migrate@latest create -seq -ext=.sql -dir=./resources/migrations ${name}
@Big-Vi
Big-Vi / Makefile
Created July 6, 2023 01:57 — forked from alexedwards/Makefile
Boilerplate Makefile for Go projects
# Change these variables as necessary.
MAIN_PACKAGE_PATH := ./cmd/example
BINARY_NAME := example
# ==================================================================================== #
# HELPERS
# ==================================================================================== #
## help: print this help message
.PHONY: help
@Big-Vi
Big-Vi / mysqldump.txt
Created February 28, 2023 21:33
Download remote MySQL DB to local computer
mysqldump -u <username> -p <database> --no-tablespaces > <db-name>.sql
scp -i <ssh-key-path> username@IP:<db-name>.sql <local-directory>
. - Any Character Except New Line
\d - Digit (0-9)
\D - Not a Digit (0-9)
\w - Word Character (a-z, A-Z, 0-9, _)
\W - Not a Word Character
\s - Whitespace (space, tab, newline)
\S - Not Whitespace (space, tab, newline)
# Anchors
\b - Word Boundary
@Big-Vi
Big-Vi / docker-ec2-ubuntu
Created February 4, 2023 19:59
Pull docker image into EC2 Ubuntu instance for testing
sudo su
apt update
apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64,arm64] https://download.docker.com/linux/ubuntu focal stable"
apt-cache policy docker-ce
apt install docker-ce
systemctl status docker
@Big-Vi
Big-Vi / init.vim
Last active April 24, 2022 03:12
Vim configuration
set nocompatible
:set number
:set nu
:set autoindent
:set tabstop=4
:set shiftwidth=4
:set smarttab
:set softtabstop=4
:set mouse=a
set guifont=hack_nerd_font:h13