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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.1" toolsVersion="2182" systemVersion="11E53" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="TW7-Kq-wgK"> | |
<dependencies> | |
<deployment defaultVersion="1296" identifier="iOS"/> | |
<development defaultVersion="4200" identifier="xcode"/> | |
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1181"/> | |
</dependencies> | |
<scenes> | |
<!--View Controller - Item 2--> | |
<scene sceneID="po5-V2-n83"> |
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
{% if site.coderwall_user %} | |
<section> | |
<h1>Coderwall Badges</h1> | |
<ul id="cw_badges"> | |
<li class="loading">Status updating...</li> | |
</ul> | |
<p id="badges"></p> | |
<script type="text/javascript"> | |
function show_achievements(args) { | |
var badges = args["data"]["badges"]; |
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
url: http://toamitkumar.github.com | |
title: RubyizednRailified Blog | |
subtitle: Ruby, Rails and others. | |
author: Amit Kumar | |
simple_search: http://google.com/search | |
description: toamitkumar | |
date_format: "ordinal" | |
subscribe_rss: /atom.xml | |
subscribe_email: |
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
require 'rubygems' | |
require 'nokogiri' | |
require 'fileutils' | |
require 'date' | |
require 'uri' | |
# usage: ruby blogger_import.rb my-blog.xml | |
data = File.read ARGV[0] | |
doc = Nokogiri::XML(data) |
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
class Product | |
def initialize | |
@name = "Ruby Book" | |
@price = 20.65 | |
end | |
end | |
product = Product.new | |
hash = {} | |
product.instance_variables.each {|attr| hash[attr.to_s.delete("@")] = product.instance_variable_get(attr) } |
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 sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
Ajax: | |
twitter.html | |
1. | |
<input id="TWEET" type=button value="Get Tweets" "/> | |
# Always try to use small case for 'id' attributes. Standard coding practice |
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
Day 1: | |
1. | |
Excellent. Like the clear separation of html, css and js. | |
2. | |
$("<li>"+data[i].text+"</li>").appendTo("#ulTweets").hide(); | |
# This will add "li" to the DOM inside loop. Not good for performance. | |
# Its better to build a string inside a loop and add the whole string to the DOM outside of loop. |
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
Day 1: | |
twitt.html (or tweet.html, probably a typo) | |
1. | |
Always try to use small case for 'id' attributes. Standard coding practice | |
2. | |
Inline CSS and JS is bad practice. Always create files and include them. |