Skip to content

Instantly share code, notes, and snippets.

Avatar

Anurag Regmi anuragregmi

View GitHub Profile
View vimrc
"" General
set number " Show line numbers
set linebreak " Break lines at word (requires Wrap lines)
set showbreak=+++ " Wrap-broken line prefix
set textwidth=100 " Line wrap (number of cols)
set showmatch " Highlight matching brace
set visualbell " Use visual bell (no beeping)
set hlsearch " Highlight all search results
set smartcase " Enable smart-case search
@anuragregmi
anuragregmi / pycahrm_shell_plus_console.md
Last active Jan 22, 2020
Running shell plus in python console pycharm
View pycahrm_shell_plus_console.md
  1. Open settings of pycharm (Ctrl+Alt+S)

  2. Go to django console settings (Simply search "django console")

  3. In starting script replace with following

    Note: If you have different settings module, then set DJANGO_SETTINGS_MODULE in environment variable. Eg. DJANGO_SETTINGS_MODULE=config.settings

    Note: You must have django_extensions installed

import sys; print('Python %s on %s' % (sys.version, sys.platform))
import django; print('Django %s' % django.get_version())
@anuragregmi
anuragregmi / git-bare-repo-setup.md
Last active Dec 3, 2019
Setting Up bare repo on server
View git-bare-repo-setup.md

Set up Bare git repo on server

Create a folder to keep our code(work tree of git)

mkdir /home/user/app/

Create a folder for git (eg. repo.git) and cd

mkdir repo.git
cd repo.git
@anuragregmi
anuragregmi / qemu.md
Created Apr 4, 2019
creating qemu images and running virtual machine
View qemu.md

Create image

  • 20G is size of your image, or hard disk for virtual machine
  • virtual.img is the image file
qemu-img create -f qcow2 virtual.img 20G

Booting img for first time for installation

  • 2G is RAM for virtual machine
View keybase.md

Keybase proof

I hereby claim:

  • I am anuragregmi on github.
  • I am anurag_ (https://keybase.io/anurag_) on keybase.
  • I have a public key whose fingerprint is 15C2 3DC3 C140 FA27 30FF A802 04C6 82FF 8B83 0D6E

To claim this, I am signing this object:

@anuragregmi
anuragregmi / tmux.conf
Last active Feb 25, 2020
My config file for tmux
View tmux.conf
set -g prefix C-a
set -g mouse
unbind C-b
bind C-a send-prefix # Pass on ctrl-a for other apps
unbind %
unbind '"'
bind \ split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
You can’t perform that action at this time.