I hereby claim:
- I am bhuga on github.
- I am bhuga (https://keybase.io/bhuga) on keybase.
- I have a public key whose fingerprint is 73A5 ACF2 703C 88E3 A25B 8D88 4E78 3A18 06B9 07E8
To claim this, I am signing this object:
require 'rubygems' | |
require 'ruby-debug' | |
require 'spira' | |
require 'rdf/rdfxml' | |
require 'sparql/client' | |
class Actor | |
include Spira::Resource |
require 'sparql/client' | |
require 'rest_client' | |
sparql = SPARQL::Client.new("http://dbpedia.org/sparql") | |
# existing functionality: | |
p sparql.query("select distinct ?Concept where {[] a ?Concept}").inspect | |
# now equivalent to: | |
response = RestClient.post 'http://dbpedia.org/sparql', { :query => "select distinct ?Concept where {[] a ?Concept}" }, :content_type => 'application/x-www-form-urlencoded', :accept => 'application/sparql-results+json' |
#!/usr/bin/env ruby | |
require 'ffi-rzmq' | |
#IPC_SOCKET = "ipc:///tmp/assert-demo.zmq" | |
IPC_SOCKET = 'tcp://localhost:5555' | |
@sender_context = ZMQ::Context.new(2) | |
send_socket = @sender_context.socket(ZMQ::REQ) | |
second_send_socket = nil | |
send_socket.connect(IPC_SOCKET) |
$ -> | |
class window.Chat extends Backbone.Model | |
class window.ChatList extends Backbone.Collection | |
model: Chat | |
window.chats = new ChatList | |
class window.ChatView extends Backbone.View | |
tagName: 'li' |
guard 'spork', :rspec_env => { 'RAILS_ENV' => 'test' } do | |
watch('Gemfile.lock') | |
watch('spec/spec_helper.rb') | |
watch('config/application.rb') | |
watch('config/environment.rb') | |
watch(%r{^config/environments/.+\.rb$}) | |
watch(%r{^config/initializers/.+\.rb$}) | |
watch(%r{^spec/support/.+\.rb$}) | |
watch(%r{^spec/factories/.+\.rb$}) | |
# watch(%r{^spec/factories/.+\.rb$}) # Uncomment when you have a large amount of factories |
class User < ActiveRecord::Base | |
protection_strategy :whitelist do | |
only :first_name, :last_name, :login, :password, :password_confirmation | |
end | |
protection_strategy :blacklist do | |
except :encrypted_password | |
end | |
end | |
u = User.new({protected_attribute: "blah", first_name: "John"}, filter: :whitelist) |
class DeviseCreateUsers < ActiveRecord::Migration | |
def change | |
create_table(:users) do |t| | |
## Database authenticatable | |
t.string :username, :null => false, :default => "" | |
t.string :email, :null => false, :default => "" | |
t.string :encrypted_password, :null => false, :default => "" | |
## Recoverable | |
t.string :reset_password_token |
class Sawyer::Resource | |
def to_attrs | |
hash = self.attrs.clone | |
hash.keys.each do |k| | |
if hash[k].is_a?(Sawyer::Resource) | |
hash[k] = hash[k].to_attrs | |
end | |
end | |
hash | |
end |
Path: /usr/lib/ImageMagick-6.5.7/config/type-ghostscript.xml | |
Font: AvantGarde-Book | |
family: AvantGarde | |
style: Normal | |
stretch: Normal | |
weight: 400 | |
glyphs: /usr/share/fonts/type1/gsfonts/a010013l.pfb | |
Font: AvantGarde-BookOblique | |
family: AvantGarde | |
style: Oblique |
I hereby claim:
To claim this, I am signing this object: