Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🐧 🗡️ 💻

Milan Thapa thapakazi

💭
🐧 🗡️ 💻
View GitHub Profile
View -
he hey I am gonna change this gist 5868085 now.
View maya
# असारको माया
यो माया भन्‍ने चिज कस्तो
गर्मीमा घाम नलागेको जस्तो
लोडसेडीगमा tube-lite बाल्या जस्तो॥
यतिमात्र होईन, कि कसो,
गाईको दुध पनि कस्तो सस्तो
ncell को sim-card लिए जस्तो
View my_few_words
we don't know where we will gonna be,
we don't know what it is goona next,
but one thing we are sure that,
we should dig, keep digging,
here,there, everywhere...
with hope that we could have one matced ryme
hey I just made a line
View hello.gist
#gist :D
###Gist
-- a gem to upload snippets to https://gist.github.com
###How to install first ??
if ruby is installed then `gem install gist`
if you're using bundler then `source :rubygems gem gist`
###How to use it ?
@thapakazi
thapakazi / Awesome Links
Created Jul 2, 2013
Centralizing of Logging
View Awesome Links
@thapakazi
thapakazi / Virtualisation
Created Jul 3, 2013
Virtualisation Cookings with kvm,
View Virtualisation
#installation of Ubuntu 12.04,virtual Machine with KVM
virt-install -n ubuntu002 -r 2048 --vcpus=2 --os-type=linux --os-variant=ubuntuprecise --disk /var/lib/libvirt/images/ubuntu2_boot.img,device=disk,bus=virtio,size=20,sparse=true,format=raw -w bridge=br0,model=virtio --vnc --noautoconsole --location /var/lib/libvirt/images/ubuntu-12.04-server-amd64.iso --extra-args='console=tty0 console=ttyS0,115200n8 serial'
View csv-search.rb
#!/usr/bin/env ruby
require 'csv'
# This assumes:
# - Ruby 1.9's CSV library, if you are using 1.8, use FasterCSV.
#
# https://raw.github.com/hadley/data-baby-names/master/baby-names.csv
csv_fname = "baby-names.csv"
@thapakazi
thapakazi / gist:6426932
Created Sep 3, 2013
OAuth , O mean opensOurce and Auth means ~orization
View gist:6426932
http://wiki.developerforce.com/page/Using_OAuth_to_Authorize_External_Applications
http://support.google.com/a/bin/answer.py?hl=en&answer=61017
http://oauth.net/
All these define OAuth as an opensource protocal to allow secure authorization in a simple and standard method from web, mobile, desktop apps. Eg:
*The OAuth documentation uses the analogy of a valet key to explain key concepts. When you park your car with a valet, you don't give him your regular key. You give him a special valet key that restricts his access to certain things like the trunk, glove box, etc. The rationale behind OAuth is the same. You give the consumer application limited access to resources in the service provider that you define.*
View gist:6523019
<?php defined('MOODLE_INTERNAL') || die();
$configuration = array (
'siteidentifier' => NULL,
'stores' =>
array (
'default_application' =>
array (
'name' => 'default_application',
'plugin' => 'file',
'configuration' =>
View gist:6568504
Omniauth Facebook Error - Faraday::Error::ConnectionFailed
Faraday::Error::ConnectionFailed
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook, '<key from fb>', '<another key from fb>'
end
class SessionsController < ApplicationController
def create
You can’t perform that action at this time.