Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<!-- NOTE: this host-meta end-point is a pre-alpha work in progress. Don't rely on it. -->
<!-- Please follow the list at http://groups.google.com/group/webfinger -->
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0" xmlns:hm="http://host-meta.net/xrd/1.0">
<hm:Host xmlns="http://host-meta.net/xrd/1.0">gmail.com</hm:Host>
<Link rel="lrdd" template="http://www.google.com/s2/webfinger/?q={uri}">
<Title>Resource Descriptor</Title>
</Link>
</XRD>
create_table "permits", :force => true do |t|
t.string "number", :null => false
t.string "name", :null => false
t.string "agency_project"
t.integer "contact_id"
t.string "category"
t.string "when_req"
t.string "owner"
t.string "renewable"
t.boolean "startup_monitoring_reqd"
class Diaria < ActiveRecord::Base
has_many :itens, :class_name => "DiariaItem"
def gerarItensDiaria
itens.create({:tipo => 3,
:quantidade => diaria_com_pernoite,
:valor => 150.00})
end
end
require 'json'
require 'isaac'
configure do |c|
c.nick = "icecondor"
c.server = "irc.freenode.net"
c.port = 6667
end
on :connect do
## HTML
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="dashboard.css" />
</head>
<body>
<header>
<span class="">Don's Dashboard </span>
</header>
## From the cancan home page
class Ability
include CanCan::Ability
def initialize(user)
if user.admin?
can :manage, :all
else
can :read, :all
end
## Development laptop sqlite, correct server_url & secret
INSERT INTO "open_id_associations" ("server_url", ...
VALUES('http://www.myopenid.com/server', '
>> Association
=> Association(id: integer, server_url: binary, handle: string, secret: binary, issued: integer, lifetime: integer, assoc_type: string)
>> Association.last
=> #<Association id: 30,
server_url: "http://www.myopenid.com/server",
handle: "{HMAC-SHA1}{4cd1bdfa}{5iWn2Q==}", secret: "\224��䞈�5�\273d\215\224\377т#\217\001", issued: 1288814075, lifetime: 1209600, assoc_type: "HMAC-SHA1">
@donpdonp
donpdonp / gist:711283
Created November 23, 2010 05:03
stock strategies
1. enforce a minimum price
Buy up anything less than the minimum price
2. move the price within the spread
Buy and sell to yourself at a price within the spread
@donpdonp
donpdonp / gist:736889
Created December 10, 2010 21:59
webfinger commandline
$ webfinger don.park@gmail.com
<http://portablecontacts.net/spec/1.0> http://www-opensocial.googleusercontent.com/api/people/
<http://portablecontacts.net/spec/1.0#me> http://www-opensocial.googleusercontent.com/api/people/117199876291309469700/
<http://webfinger.net/rel/profile-page> http://www.google.com/profiles/don.park
<http://microformats.org/profile/hcard> http://www.google.com/profiles/don.park
<http://gmpg.org/xfn/11> http://www.google.com/profiles/don.park
<http://specs.openid.net/auth/2.0/provider> http://www.google.com/profiles/don.park
<describedby> http://www.google.com/profiles/don.park
<describedby> http://www.google.com/s2/webfinger/?q=don.park%40gmail.com&fmt=foaf
<http://schemas.google.com/g/2010#updates-from> https://www.googleapis.com/buzz/v1/activities/117199876291309469700/@public
@donpdonp
donpdonp / twitter-keyword
Created February 4, 2011 17:39
quick streaming twitter keyword search
#!/usr/bin/env ruby
# filename: twitter-stream
#
#$ sudo gem install twitter-stream json
#$ ./twitter-stream superbowl
#@ZZZZThomas If you tell me your fave #SuperBowl recipe here, you could win free books
#@ZZle_Model smh all these #steelerhaters... They must not want the steelers to win a
require 'rubygems'
require 'json'