Skip to content

Instantly share code, notes, and snippets.

View shivabhusal's full-sized avatar

Shiva Bhusal shivabhusal

View GitHub Profile
@shivabhusal
shivabhusal / notes-git-tutorial.md
Created September 26, 2023 06:33
Best Git Tutorial Links for Beginners

Title: Best Git Tutorial Links for Beginners

Are you new to Git and looking for the best resources to kickstart your journey into version control and collaborative software development? You're in luck! Git is a powerful tool used by developers worldwide, and there are numerous tutorials available to help you get started. To make your search easier, we've compiled a list of some of the best Git tutorial links for beginners.

  1. Beginner's Guide for Git by Shiva

    Shiva's comprehensive guide provides a step-by-step introduction to Git, making it an excellent starting point for beginners. You'll learn the basics of Git, including how to set it up, create repositories, and perform essential version control tasks.

  2. Git Documentation

@shivabhusal
shivabhusal / git_branch
Last active July 26, 2020 00:51
Add this snippet in Linux (Ubuntu)'s `~/.bashrc` to see your current git-branch in terminal prompt
# Author : Shiva Bhusal
# github: shivabhusal
# stackoverflow: users/3437900/illusionist
##########################################
# Usages:
# - create a file called ~/.promptrc
# - add following in ~/.bashrc
# `source ~/.promptrc`
# # this will include the source of the file
@shivabhusal
shivabhusal / cheat sheet.html.markdown
Last active March 28, 2020 03:35
Some useful cheat sheet links for Font awesome, Material design, jQuery, Ruby, HTML, CSS, etc
@shivabhusal
shivabhusal / rails.np.yml
Created August 8, 2019 11:28
rails i18n for nepali language. put this file to config/locale dir
np:
date:
abbr_day_names:
- आईत
- सोम
- मंगल
- बुध
- बिही
- शुक्र
- शनि
@shivabhusal
shivabhusal / test_setup_and_gem_install_template.rb
Last active April 16, 2019 16:59
A Rails template for generating boilerplate configs for any new Rails app; viz. rspec, factory_girl_rails, db-cleaner,annonote etc are preconfigured. It saves me an hour everytime.
gem 'slim-rails'
gem 'sassc-rails'
gem 'any_login'
gem 'active_model_serializers', '~> 0.10.0'
gem 'responders'
gem_group :development do
gem 'annotate'
end
@shivabhusal
shivabhusal / clipboard.history.json
Last active December 30, 2018 05:55
Visual Studio Code Settings Sync Gist
{
"version": 2,
"clips": [
{
"value": "Date.yesterday.to_s",
"createdAt": 1546148589178,
"copyCount": 1,
"useCount": 0,
"language": "ruby",
"createdLocation": {
@shivabhusal
shivabhusal / install.sh
Created September 5, 2017 03:58
Installation of OhMyZSH in linux ubuntu/mint
sudo apt-get install zsh
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
echo "ZSH_THEME=\"agnoster\"" >> ~/.zshrc
cd ~/ && wget https://github.com/powerline/powerline/blob/develop/font/PowerlineSymbols.otf
sudo cp ~/PowerlineSymbols.otf /usr/share/fonts/truetype/
@shivabhusal
shivabhusal / application_helper.rb
Created August 25, 2017 05:28
Rails : Server separate images in production and development environment
module ApplicationHelper
# It hijacks the methods
[:image_tag, :image_path, :image_url].each do |m_name|
define_method(m_name) do |*arg|
begin
super(*arg)
rescue Sprockets::Rails::Helper::AssetNotFound
arg[0] = "#{Rails.env}/#{arg[0]}"
super(*arg)
require 'date'
Tables = [
"admin_users",
"active_admin_comments",
"arx_location",
"arx_user",
"arx_location_owner",
"arx_machine",
"ar_internal_metadata",
$colors: aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkturquoise darkviolet deeppink deepskyblue dimgray dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgray lightgreen lightpink lightsalmon lightseagreen lightskyblue lightslategray lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace