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 / bootstrapping.md
Created November 28, 2016 12:27 — forked from dideler/bootstrapping.md
Bootstrapping - a list of useful resources to get up and running quickly

Welcome!

UPDATE: This list is no longer maintained. I've moved it to its own repo so you can send suggestions as Pull Requests. https://github.com/dideler/bootstrapping/

For feedback or suggestions, please send a tweet (@dideler). Gist comments don't notify me. Pull requests aren't possible with gists (yet), so I don't recommend forking because then I can't easily get the change.

Starring this gist will give me an idea of how many people consider this list useful.

@veekram
veekram / ExampleReduxForm.jsx
Created July 21, 2017 06:12 — forked from mlaursen/ExampleReduxForm.jsx
Code for example redux-form and react-md
import React from 'react';
import { Field, reduxForm } from 'redux-form';
import Button from 'react-md/lib/Buttons/Button';
import TextField from 'react-md/lib/TextFields';
const required = ['email', 'phone'];
const validate = values => {
const errors = {};
required.forEach(field => {
if (!values[field]) {
@veekram
veekram / analyzer.rb
Created September 19, 2017 12:47 — forked from FrancoB411/analyzer.rb
Text Analyzer from Beginning Ruby
#analyzer.rb -- Text Analyzer
stopwords = %w{the a by on for of are with just but and to the my I has some in}
lines = File.readlines(ARGV[0])
line_count = lines.size
text = lines.join
#count the characters
character_count = text.length
@veekram
veekram / spacemacs-keybindings
Created September 25, 2017 10:46 — forked from adham90/spacemacs-keybindings
spacemacs keybindings that i need to learn
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
@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
@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 / 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 / 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 / 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 / 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"