Skip to content

Instantly share code, notes, and snippets.

View dlamichhane's full-sized avatar
🏠
Working from home

Deepak Lamichhane dlamichhane

🏠
Working from home
View GitHub Profile
@dlamichhane
dlamichhane / README.md
Created May 12, 2020 21:44 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@dlamichhane
dlamichhane / svm.csv
Created November 13, 2019 12:14
Data for SVM
Weight Size Class
69 4.39 orange
69 4.21 orange
65 4.09 orange
72 5.85 apple
67 4.7 orange
73 5.68 apple
70 5.56 apple
75 5.11 apple
74 5.36 apple
To push without using SSH
- git push https://username:password@myrepository.biz/file.git --all
@dlamichhane
dlamichhane / ruby_exception.rb
Last active March 16, 2018 10:10
Ruby Exception
module Me
LimitException = Class.new(StandardError)
LimitException2 = Class.new(StandardError)
class Sync
def self.find_me(digit)
raise LimitException if digit == 1
raise LimitException2 if digit == 2
puts digit
end
@dlamichhane
dlamichhane / braking.md
Created October 18, 2017 09:38
Fahrschule
def nep_to_eng(*args)
date = args.map{|val| val.to_i}
date_error = date_valid(date, "np")
unless date_error.empty?
return date_error.collect{ |error| "Enter appropriate #{error}"}
else
en_start_year = 1943; en_start_month = 4; en_start_day = 14 - 1
np_start_year = 2000; np_start_month = 1; np_start_day = 1
day_of_week = 4 - 1
@dlamichhane
dlamichhane / gist:6784142
Created October 1, 2013 19:56
Install LAMP stack on Ubuntu
Install LAMP stack on unix
Followed this steps: http://www.howtoforge.com/ubuntu_lamp_for_newbies
Install Apache
1) sudo apt-get install apache2
Install php5
# 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL
# 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew
# https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers
# 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it
gem install bundler
# 1. Get edge Rails source (master branch)
git clone https://github.com/rails/rails.git
@dlamichhane
dlamichhane / Solution to native gems on windows
Last active May 20, 2022 16:48
Installing Native gems on windows
I Copied from the following URL:
1) http://rubyonwindowsguides.github.io/book/ch02-05.html
Now we are fully equipped for Ruby development on Windows. Yet problem of installing native gems requires our attention and better explanation. DevKit’s smoke test passed without problem but does it mean we can install any gem written in C/C++? Unfortunately the answer is no.
Native gems might depend on other libraries which are hard, or sometimes, impossible to build on Windows. Example of such a gem is Nokogiri, HTML and XML parser for Ruby, built upon Libxml2 library. Libxml2 is XML parser and toolkit written in C. If you want to know how to deal, at least partially, with such a libraries you should continue reading this chapter. Otherwise you can freely skip to the section “Installing Ruby On Rails”.
c:\>gem install nokogiri --platform=ruby
@dlamichhane
dlamichhane / gist:5894774
Created June 30, 2013 11:06
Solution to problem of installing native gems on windows machine
Reference: http://rubyonwindowsguides.github.io/book/ch02-05.html
Installing Native Gems
Now we are fully equipped for Ruby development on Windows. Yet problem of installing native gems requires our attention and better explanation. DevKit’s smoke test passed without problem but does it mean we can install any gem written in C/C++? Unfortunately the answer is no.
Native gems might depend on other libraries which are hard, or sometimes, impossible to build on Windows. Example of such a gem is Nokogiri, HTML and XML parser for Ruby, built upon Libxml2 library. Libxml2 is XML parser and toolkit written in C. If you want to know how to deal, at least partially, with such a libraries you should continue reading this chapter. Otherwise you can freely skip to the section “Installing Ruby On Rails”.
Just for illustration try to install Nokogiri from sources. Installation will fail with quite a long message printed out in the Command Prompt. Leaving out irrelevant parts output looks similar to following: