This file contains hidden or 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 'hpricot' | |
username = "<username>" | |
password = "<password>" | |
tix = Hpricot(IO.popen("curl https://trac.zenbe.com/report/7 --basic -u #{username}:#{password} -k -s")) | |
(tix/"table.listing.tickets"/"tbody"/"tr").each { |row| | |
ticket = (row/"td.ticket"/"a").first.inner_html |
This file contains hidden or 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
(function(){ | |
Channels.UI.TimezonePulldown = Class.create(ZenUIView); | |
Channels.UI.TimezonePulldown.addMethods({ | |
initialize : function($super, options){ | |
this.klassName = 'Channels.UI.TimezonePulldown'; | |
this.defaultTimezone = 'America/New_York'; | |
this.callbacks = { | |
normal : [ |
This file contains hidden or 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
/** | |
* Move the root element offscreen | |
* @function ? | |
*/ | |
hideOffscreen : function(){ | |
this.el.setStyle({position:'absolute', top:'-5000px', left:'-5000px'}) | |
}, | |
/** | |
* Center the root element on the target |
This file contains hidden or 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
View Constructor: | |
this.configure(options); | |
this._reset(); | |
this.render(); | |
Base View | |
.el - conventional root element reference for every view | |
.toElement - returns this.el | |
.childViews - Array of child views |
This file contains hidden or 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
(function(){ | |
Zen.UI.Mixins.Bindable = { | |
// bind the model to the view | |
setModel : function(model){ | |
this.model = model; | |
this.model.observe(Observable.ALL_EVENTS, this._onModelEvent.bind(this), this, 'Zen.UI.View observer'); | |
}, | |
// handle binding to the model |
This file contains hidden or 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
test |
This file contains hidden or 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
# This script will verify the privacy settings on documents you have loaded | |
# to the scribd api. | |
require 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
def get_docs(api_uri, limit, offset) | |
api_uri += "&limit=#{limit}&offset=#{offset}" |
This file contains hidden or 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 'net' |
This file contains hidden or 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 'net' |
NewerOlder