Skip to content

Instantly share code, notes, and snippets.

View veekram's full-sized avatar
🐼
Focusing

Bikram Suwal veekram

🐼
Focusing
  • nbinfotech (p).ltd
  • Surybinayak , Bkt , Nepal
View GitHub Profile
@veekram
veekram / button_spinner.css.sass
Created February 8, 2018 18:55 — forked from erotte/button_spinner.css.sass
Ajax loading indicator (Spinner) with Rails/SASS/Bootstrap 2/FontAwesome
%spinner
@extend [class^="icon-"]
@extend .icon-refresh
@extend .icon-spin
+transition(opacity 1s ease, width 0.7s ease, height 0.3s ease)
position: relative
top: -1px
display: inline-block
overflow: hidden
text-decoration: inherit
@veekram
veekram / rails_load_path_tips.md
Created January 30, 2018 18:07 — forked from maxim/rails_load_path_tips.md
How to use rails load paths, app, and lib directories.

In Rails 3

NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths

If you add a dir directly under app/

Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.

If you add a dir under app/something/

@veekram
veekram / rails_load_path_tips.md
Created January 30, 2018 18:07 — forked from maxim/rails_load_path_tips.md
How to use rails load paths, app, and lib directories.

In Rails 3

NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths

If you add a dir directly under app/

Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.

If you add a dir under app/something/

@veekram
veekram / s3cmd_install.md
Created January 23, 2018 06:22 — forked from dominicsayers/s3cmd_install.md
Installing s3cmd on Ubuntu Server
  1. sudo apt-get install python-setuptools
  2. wget http://downloads.sourceforge.net/project/s3tools/s3cmd/1.5.0-alpha1/s3cmd-1.5.0-alpha1.tar.gz
  3. tar xvfz s3cmd-1.5.0-alpha1.tar.gz
  4. cd s3cmd-1.5.0-alpha1
  5. python setup.py install
  6. s3cmd --configure
@veekram
veekram / S3InstallUbuntu
Created January 23, 2018 06:20 — forked from bendangelo/S3InstallUbuntu
One line install S3cmd on Ubuntu
# Install with:
# bash < <(curl -L https://raw.github.com/gist/2767174)
echo "Installing S3cmd..."
wget -O- -q http://s3tools.org/repo/deb-all/stable/s3tools.key | sudo apt-key add -
sudo wget -O/etc/apt/sources.list.d/s3tools.list http://s3tools.org/repo/deb-all/stable/s3tools.list
sudo apt-get update && sudo apt-get install s3cmd
echo "Done"
@veekram
veekram / autopgsqlbackup
Created January 23, 2018 06:02 — forked from matthewlehner/autopgsqlbackup
Auto PostgreSQL backup script.
#!/bin/bash
#
# PostgreSQL Backup Script Ver 1.0
# http://autopgsqlbackup.frozenpc.net
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com>
#
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at http://sourceforge.net/projects/automysqlbackup/
#
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9
@veekram
veekram / my-ruby.el
Created January 20, 2018 17:57 — forked from littlemove/my-ruby.el
Spacemacs: Code folding for ruby-mode
;; Code folding
(add-hook 'ruby-mode-hook
(lambda () (hs-minor-mode)))
(eval-after-load "hideshow"
'(add-to-list 'hs-special-modes-alist
`(ruby-mode
,(rx (or "def" "class" "module" "do" "{" "[")) ; Block start
,(rx (or "}" "]" "end")) ; Block end
,(rx (or "#" "=begin")) ; Comment start
@veekram
veekram / server.md
Created January 20, 2018 04:29 — forked from jtadeulopes/server.md
Server setup with ubuntu, nginx and puma for rails app.

Update and upgrade the system

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo reboot

Configure timezone

@veekram
veekram / multiple_ssh_setting.md
Created January 19, 2018 06:05 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@veekram
veekram / spacemacs-cheatsheet.md
Created November 24, 2017 05:47 — forked from davoclavo/spacemacs-cheatsheet.md
Spacemacs cheatsheet

emacs --daemon to run in the background. emacsclient.emacs24 <filename/dirname> to open in terminal

NOTE: "M-m and SPC can be used interchangeably".

  • Undo - C-/
  • Redo - C-?
  • Change case: 1. Camel Case : M-c 2. Upper Case : M-u
  1. Lower Case : M-l