#Mac OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
link_to "View Post", :action => 'show', :controller => 'article', :id => @article | |
link_to("View Post", {:action => 'show', :controller => 'article', :id => @article}) | |
<%= link_to "Detail", {:action=> 'detail', :id=> person.id}, :onclick => "javascript:window.open('page.html','popup','width=400,height=200');" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Story of how Anwar Shah Kashmiri became a big scholar | |
There was one big scholar, Hazrat Allama Kashmiri (rah), he had such a memory that he could remember whatever he read, maybe even after twenty years. So once Mufti Kifayatullah (rah), he was speaking to his students and then he asked a question. “Can you tell me how Anwar Shah Kashmiri (rah) became such a big scholar?” Someone said, “he was very intelligent”. The other one replied, “O he was a big scholar of Quran”. Someone said “No, big scholar of Hadith”. One said “he was a good poet”. | |
But he (Mufti Kifayatullah) kept quiet. Then the students, they asked him, “Hazrat can you tell us how he achieved these heights and became such a big scholar?” Then Mufti Kifayatullah (rah) replied that once this question was asked from Allama Anwar Shah Kashmiri (rah) himself. How you became such a big scholar? | |
He replied that I had a lot of adab for the books of knowledge. I had lot of adab. He said (the questioner) “everyone makes adab of this knowledge”. He said “no, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from UserDict import UserDict | |
class fileInfo(UserDict): | |
def __init__(self, filename=None): | |
UserDict.__init__(self) #no idea what it does.is it extending the constructor with UserDict’s constructor? | |
self["name"]=filename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Table of Contents | |
Introduction | |
Code Smells | |
Long Method | |
Large Class | |
Feature Envy | |
Case Statement |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -L https://get.rvm.io | bash -s stable --auto-dotfiles |
#Programming Manifesto
##Books Ruby
- Learn to Program by Chris Pine
- The Well-Grounded Rubyist by David Black
- Eloquent Ruby by Russ Olsen
- Practical Object-Oriented Design in Ruby by Sandi Metz
- Confident Ruby by Avdi Grimm
OlderNewer