This section lists all API that can be used to create, edit or otherwise manipulate subscriptions.
Attribute | Type | Description |
---|---|---|
id |
integer | Subscription ID (post ID) read-only |
order_number |
integer | Order number read-only |
-- | |
-- Read only | |
-- | |
-- Create a group | |
CREATE ROLE postgres_ro_group; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO postgres_ro_group; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group; |
#!/usr/bin/env ruby | |
# Pass in the name of the site you wich to create a cert for | |
domain_name = ARGV[0] | |
if domain_name == nil | |
puts "Y U No give me a domain name?" | |
else | |
system "openssl genrsa -out #{domain_name}.key 1024" | |
system "openssl req -new -key #{domain_name}.key -out #{domain_name}.csr -subj '/C=US/ST=NJ/L=Monroe/O=MyCompany/OU=IT/CN=#{domain_name}'" |
var jq = document.createElement('script'); | |
jq.src = "http://code.jquery.com/jquery-latest.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
jQuery.noConflict(); |
ec2-authorize default -p 2003 |
require 'rubygems' | |
require 'activemerchant' | |
ActiveMerchant::Billing::Base.mode = :test | |
paypal_options = { | |
:login => 'xxx', | |
:password => 'yyy', | |
:signature => 'zzz' | |
} | |
::PAYPAL_EXPRESS_GATEWAY = ActiveMerchant::Billing::PaypalExpressGateway.new(paypal_options) |
#config/initializers/omniauth.rb | |
require 'openid/store/filesystem' | |
ActionController::Dispatcher.middleware.use OmniAuth::Builder do #if you are using rails 2.3.x | |
#Rails.application.config.middleware.use OmniAuth::Builder do #comment out the above line and use this if you are using rails 3 | |
provider :twitter, 'key', 'secret' | |
provider :facebook, 'app_id', 'secret' | |
provider :linked_in, 'key', 'secret' | |
provider :open_id, OpenID::Store::Filesystem.new('/tmp') | |
end |
knife ec2 server create -G default -I ami-61be7908 -f m1.small \ | |
-S schisamo -x ubuntu -d ubuntu10.04-ruby192 |
module ApplicationHelper | |
# Access Levels | |
ACCESS_LEVELS = { :private => 0, :friends => 1, :public => 2 } | |
# Access levels i18n translation | |
def access_levels | |
ACCESS_LEVELS.collect{|k,v| [I18n.t("access." + k.to_s), v]} | |
end | |
end |
This is a semi-quick key/value store I put together for a quick way to store temporary data related to what's in my database, in a reliable way. For example, I'm using it to keep track of where a hourly and a daily crontask that processes statistics left off, so it can resume only processing and summarizing new data on the next run.
Code quality most likely is not great, but it works. And I will update this gist as I update my project.
The settings table has two columns, a key
and a value
column. The value
column is serialized, so you can technically store almost anything in there. Memcache is also used as a caching layer to minimize database calls.