Skip to content

Instantly share code, notes, and snippets.

View tanvirraj's full-sized avatar
🚢
coding

Tanvir Raj tanvirraj

🚢
coding
View GitHub Profile
def form &block
puts "<form>"
yield
puts "</form>"
end
def paragraph text
puts "<p>" + text + "</p>"
end
@tanvirraj
tanvirraj / microblogger
Created July 25, 2013 00:13
a simple command line twitter client press t for tweet q for quit :P
require "jumpstart_auth"
class MicroBlogger
attr_reader :client
def initialize
puts "Initializing"
@client =JumpstartAuth.twitter
@tanvirraj
tanvirraj / dnsd.rb
Created September 23, 2013 02:28 — forked from andreif/dnsd.rb
# Simple, scrappy UDP DNS server in Ruby (with protocol annotations)
# By Peter Cooper
#
# MIT license
#
# * Not advised to use in your production environment! ;-)
# * Requires Ruby 1.9
# * Supports A and CNAME records
# * See http://www.ietf.org/rfc/rfc1035.txt for protocol guidance
# * All records get the same TTL
@tanvirraj
tanvirraj / install npm
Created October 9, 2013 09:55
easy way to install npm
git clone http://github.com/isaacs/npm.git
cd npm
sudo make install
first you must have install xcode and xcode commnand line tool
then we intalll
hombrew The best package management system on Mac OS X for this is
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
then we need to install git (i know you have :P )
$ brew install git
#!/usr/bin/env ruby
require 'koala' # gem install koala --no-ri --no-rdoc
# create a facebook app and get access token from here
# https://developers.facebook.com/tools/explorer
# select "groups", "photos" when authenticating
oauth_access_token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
group_filtering_words = ['ruby']
image_path = 'image.png' #change to your image path
message = 'My Cool image.' # your message
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
#install postgis
brew install postgis
#start virtualenv
#install dependency
#install pil , pillow
#install distribute without version
# setup databage templeate postgis.sh
# setup postgis path into postgis.sh
# fix bug at vintualenv about postgis verison
bug :: django.contrib.gis.geos.error.GEOSException: Could not parse version info string "3.4.2-CAPI-1.8.2 r3921"