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 / 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 / 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
javascript:
$(function () {
Chart.elements.Line.prototype.draw = function () {
var blackColor = 'rgba(0, 0, 0, 1)';
var redColor = 'rgba(255, 0, 0, 1)';
var scale = this.scale
// draw lines
var points = this._chart.getDatasetMeta(0).data;
@shivabhusal
shivabhusal / template.rb
Created July 9, 2017 17:23
A Rails template to generate config/database.yml files for specific database like `mysql` , `sqlite`, `pg`. You may fork it and add support for other databases as well
# ------------------- MySQL -------------------------------
MYSQL_CONFIG = <<-MYSQL
default: &default
adapter: mysql2
encoding: utf8
pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: root
password:
<% if mysql_socket %>
socket: <%= mysql_socket %>