Skip to content

Instantly share code, notes, and snippets.

View juggy's full-sized avatar
🎯
Focusing

Julien Guimont juggy

🎯
Focusing
View GitHub Profile
$('#resources.button').popover({header: "#resources-header", content: "#resources-content"});
nameLabel: SC.LabelView.design({
layout: { top: 5, height: 24, left: 5, right: 0},
value: "Email",
controlSize: SC.LARGE_CONTROL_SIZE,
fontWeight: SC.BOLD_WEIGHT
}),
titleLabel: SC.FieldView.design({
layout: { top: 5, height: 24, left: 90, right: 0},
valueBinding: "Ccube.contactObjectController.email",
})
.field
%label Email
%input{:type=>"text"} [email protected]
(sudo) gem install bolide-client
@juggy
juggy / api auth.rb
Created March 14, 2010 19:06
API Auth
# Headers should be:
#
# X-Bol-Date: <Date of the request, format doesn't matter>
# X-Bol-Authentication: <MD5 Hash>
# Content-Type: application/xml
#
def headers
now = DateTime.now.to_s
{'X-Bol-Date'=>now, 'X-Bol-Authentication'=>auth_key(now), 'Content-Type'=>'application/xml'}
end
<!-- It uses prototype & the bolide.js found in the ruby plugin or at live.bolideapp.com -->
<script src="/javascripts/prototype.js?1267672430" type="text/javascript"></script>
<script src="http://live.bolideapp.com/js/bolide.js" type="text/javascript"></script>
<script type="text/javascript">
// With session ID and Token
bolide = new Bolide.Client("bolide", "b79c55c143df93241981c49aa97329f6", "cdcdaeb0-11c6-012d-0145-404077aa86f5", {
onSuccess: function(response){
print("Success", response);
},
@juggy
juggy / bolide-client-use.rb
Created March 14, 2010 18:49
One way to use the bolide client api for ruby
require "bolide"
def load_bolide
# For use with rails: a client/q per session is created
@bolide = session[:bolide]
@q = session[:q]
if @bolide.nil?
# create a new session with Bolide
@bolide = Bolide::Account.new("bolide", "xxxx61d0-095c-012d-0076-404077aa86f5")
@juggy
juggy / Errors and Warnings.xml
Created March 14, 2010 18:46
Errors and warnings return value
<errors>
<error> Can't be saved </error>
</errors>
<warnings>
<warning> Cannot send msg, queue does not exist</warning>
</warnings>
@juggy
juggy / Read Message URL
Created March 14, 2010 18:44
Client URL to read a message
GET http://live.bolideapp.com/<account>/<queue_name>/<valid_token>
@juggy
juggy / Send Message URL
Created March 14, 2010 18:42
Create Message URL
POST http://live.bolideapp.com/msg.xml