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 'lastfm' | |
API_KEY = 'XXX' | |
API_SECRET = 'XXX' | |
lastfm = Lastfm.new(API_KEY, API_SECRET) | |
# token = lastfm.auth.get_token | |
token = '435708b60cde32b6df36b8585fe75725' | |
# open http://www.last.fm/api/auth/?api_key=XXXX&token=token |
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
{"details":"Ambiguous oauth credentials provided","problem":"You are not authorized to make that request","code":"ambiguous_credentials"} |
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
module Unform | |
extend ActiveSupport::Concern | |
class FormObject | |
include Virtus | |
include ActiveModel::Validations | |
end | |
included do | |
@models = {} |
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
module Unform | |
extend ActiveSupport::Concern | |
class FormObject | |
include Virtus | |
include ActiveModel::Validations | |
end | |
included do | |
@models = {} |
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
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> | |
<style> | |
#bg-left-extension { | |
width: 1000px; | |
background: blue; | |
} | |
</style> | |
<div id="bg-left-extension" height="100"></div> |
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 Seller < ActiveRecord::Base | |
has_one :business | |
accepts_nested_attributes_for :business | |
devise :database_authenticatable, :registerable, :token_authenticatable, | |
:lockable, :timeoutable, :recoverable, :rememberable, :trackable, :validatable | |
attr_accessible :email, :password, :last_name, :first_name, :remember_me, :business_attributes |
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 Seller < ActiveRecord::Base | |
has_one :business | |
accepts_nested_attributes_for :business | |
devise :database_authenticatable, :registerable, :token_authenticatable, | |
:lockable, :timeoutable, :recoverable, :rememberable, :trackable, :validatable | |
attr_accessible :email, :password, :last_name, :first_name, :remember_me, :business_attributes |
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 ruby | |
require 'rubygems' | |
require 'tweetstream' | |
hash_tag = '#vegastech' | |
useage = [] | |
def show_stats(stats) | |
# Aggregate Results |
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
::Chef::Recipe.send(:include, Opscode::OpenSSL::Password) | |
app = data_bag_item('apps', 'bulletin_board') | |
app['mysql_root_password'][node.chef_environment] = node['mysql']['server_root_password'] | |
app['databases'][node.chef_environment]['password'] = secure_password | |
app.save | |
chef_gem 'mysql' do | |
action :install | |
end |
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 Flash model. | |
* @package hydra_flash | |
* @version 0.1 | |
*/ | |
session_start(); |