Skip to content

Instantly share code, notes, and snippets.

View rseyf's full-sized avatar

Reza Seyf rseyf

View GitHub Profile
@rseyf
rseyf / totp-reader.go
Created June 12, 2024 08:56
Go Script to read TOTP secrets from a file and generating auth codes
package main
import (
"bufio"
"fmt"
"log"
"net/url"
"os"
"strings"
"time"
@rseyf
rseyf / totp_2fa_auth.go
Created February 5, 2024 21:34
Golang TOTP 2FA authentication
package main
import (
"bufio"
"fmt"
"os"
"time"
"github.com/mdp/qrterminal"
"github.com/skip2/go-qrcode"
@rseyf
rseyf / golang_extensions.md
Last active June 9, 2024 17:31
VSCode Extensions for Golang Development

VSCode Extensions for Golang Development

Use this command to generate installed extenstions:

code --list-extensions | xargs -L 1 echo code --install-extension > my_extensions.sh

This command, will generate file named my_extensions.sh with currently installed extentions on your vscode.

@rseyf
rseyf / sublime-text3-setup.txt
Created May 30, 2019 22:03
Sublime text 3 setup
sublime text 3 basic setup:
===========================
1 - install sublime text 3
2 - install packagecontrol.io/installation
3 - install packages: Gofmt, Golang Build, sidebarenhancements, Materialized CSS Snippets, jquery,
Standard Format,CSS Media Query Snippets, Shell Exec,Terminal, Live Reload, git, HTMLAttributes
Sass,LESS, Color Picker, JsFormat, HTML-CSS-JS Prettify, All Autocomplete, Sublime Linter-jshint,
Babel, Java​Script​Next - ES6 Syntax, AdvancedNewFile, DocBlockr, Dockerfile Syntax Highlighting,
Laravel Blade Highlighter, PHPCompanion, Vuetify, ClangAutoComplete, EasyClangComplete
-- Open Shell Exec: Linux: ctrl + shift + c , Mac: shift + super + c
@rseyf
rseyf / Default (OSX).sublime-keymap
Last active May 30, 2019 14:14
My sublime text 3 key bindings
[
// file location: ~/Library/Application Support/Sublime Text 3/Packages/User/Default (OSX).sublime-keymap
//console.log() keybinding for sublime text 3
{"keys": ["ctrl+c"], "command": "insert_snippet",
"args" : {
"contents": "console.log(${1:}$SELECTION);${0}"
}
}
]
@rseyf
rseyf / vim_installer.sh
Last active July 10, 2022 23:04
My VIM Customizer
# /bin/bash
# make sure this file has execution permission to run (do NOT use sudo:
# $ chmod +x vim_installer.sh
# $ ./vim_installer.sh
# =====================================================================
# install git
echo "======== VIM INSTALLER ========"
echo "MAKE SURE YOU HAVE GIT INSTALLED!"
echo "Then press any key to continue..."
@rseyf
rseyf / molokai.vim
Created March 30, 2019 02:39
Sublime Text Editor color theme for vim
" Vim color file
"
" Author: Tomas Restrepo <tomas@winterdom.com>
" https://github.com/tomasr/molokai
"
" Note: Based on the Monokai theme for TextMate
" by Wimer Hazenberg and its darker variant
" by Hamish Stuart Macpherson
"
@rseyf
rseyf / .vimrc
Last active July 10, 2022 22:59
My .vimrc file for Vim Editor
syntax on
set t_Co=256
set t_ut=
colorscheme molokai
filetype off
filetype plugin indent on
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
@rseyf
rseyf / gist:c58555acd053a35500932aedbafffee3
Created July 30, 2018 08:17 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@rseyf
rseyf / migrate_repo.sh
Created May 5, 2018 11:20 — forked from mariozig/migrate_repo.sh
Migrate repo from GitLab to GitHub Full blog post @ http://ruby.zigzo.com/2015/03/23/moving-from-gitlab-to-github/
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror git@your-gitlab-site.com:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.