Skip to content

Instantly share code, notes, and snippets.

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

Amit Kumar toamitkumar

🏠
Working from home
View GitHub Profile
<?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">
{% 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"];
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:
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)
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) }
@toamitkumar
toamitkumar / gist:2307763
Created April 5, 2012 03:38
Capistrano Extension
@toamitkumar
toamitkumar / hack.sh
Created April 3, 2012 05:43 — forked from erikh/hack.sh
OSX For Hackers
#!/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
#
@toamitkumar
toamitkumar / feedback.js
Created March 30, 2012 02:10
venkateshn
Ajax:
twitter.html
1.
<input id="TWEET" type=button value="Get Tweets" "/>
# Always try to use small case for 'id' attributes. Standard coding practice
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.
@toamitkumar
toamitkumar / feedback.js
Created March 30, 2012 02:03
GopinathS
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.