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 'date' | |
title = "Zipf's Law of the Internet: Explaining Online Behavior" | |
link = "http://blog.parsely.com/post/57821746552" | |
image_url = "http://blog.parsely.com/inline_mra670hTvL1qz4rgp.png" | |
section = "Programming" | |
author = "Alan Alexander Milne" | |
pub_date = Time.new(2012,1,1,11,34,2, '-05:00') | |
tags = ["statistics", "zipf", "internet", "behavior"] |
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
# This file should contain all the record creation needed to seed the database with its default values. | |
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). | |
# | |
# Examples: | |
# | |
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) | |
# Mayor.create(name: 'Emanuel', city: cities.first) | |
State.create([{name: 'Alabama', abbreviation: 'AL'}, |
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
2012-06-06T04:52:28+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 35015` | |
2012-06-06T04:52:47+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5) | |
2012-06-06T04:52:47+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at |
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
a = User.find_by_email('kevin@codeforamerica.org') | |
a.admin = true | |
a.save |
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
say("Hello....", {voice:"simon"}); | |
say("......"); | |
say("yes.....", {voice:"simon"}); | |
say("......"); | |
say("this is dog", {voice:"simon"}); |
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 'sinatra' | |
require 'json' | |
require 'net/http' | |
require 'haml' | |
require 'geocoder' | |
get '/' do | |
b = JSON.parse(Net::HTTP.get(URI.parse("http://data.cityofchicago.org/api/views/nen3-vcxj/rows.json"))) | |
us = [41.864447,-87.644806] |
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
protected string ParseDate(DateTime startDate, DateTime endDate) | |
{ | |
string temp; | |
//Don't show times if 12:00 AM | |
bool showStartTime = false; | |
bool showEndTime = false; | |
if (DateTime.Parse(startDate.ToShortTimeString()) != DateTime.Parse("12:00 AM")) | |
{ | |
showStartTime = true; | |
if (DateTime.Parse(endDate.ToShortTimeString()) != DateTime.Parse("12:00 AM")) |
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
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> | |
<% | |
Dim strConn | |
strConn = "YOUR CONNECTION STRING HERE" | |
Dim Conn | |
Set Conn = Server.CreateObject("ADODB.Connection") | |
Conn.Open(strConn) |
NewerOlder