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
div.gwt-TabLayoutPanelTabs { | |
position: absolute; | |
left: 0px; | |
top: -10px; | |
z-index: 5000; | |
} | |
.GONIWUUOH { | |
background: none; | |
} |
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 'ruble' | |
command "Reformat Document" do |cmd| | |
cmd.key_binding = "CTRL+ALT+COMMAND+F" | |
cmd.output = :replace_selection | |
cmd.input = :selection, :document | |
cmd.scope = "source.js" | |
cmd.invoke do | |
require 'open3' | |
require 'beautify2' |
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
/* | |
* Long and Dreary. | |
*/ | |
var json = xml2json.parser(response_text), | |
query_result = json.envelope.body.queryresponse.result, | |
users = []; | |
// Build up a list of {{sd.User}}s to return to the view. | |
if(query_result.size == 1){ |
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
/** | |
* OAuth request message skeleton for every request. | |
* before the final url is generated, it must be run through | |
* the oauth Timestamp & Signature generators | |
* | |
* @constructor | |
*/ | |
sd.OAuth2.AuthMessage = function(code) { | |
if (code !== undefined) { | |
this.parameters = {}; |
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
var right_now = new Date(); | |
var raw_minutes = right_now.getHours() * 60 + right_now.getMinutes(); | |
while (raw_minutes % 5 > 0){ | |
raw_minutes += 1; | |
} |
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
/* | |
* advanced toolbar tinyMCE replacer for ZenDesk. | |
*/ | |
// remove all existing editors from the page. | |
var editor_types = ['entry_body', 'post_body']; | |
for (var i=0; i < editor_types.length; i++) { | |
if (tinyMCE.editors[editor_types[i]] !== undefined){ | |
tinyMCE.editors[editor_types[i]].remove(); | |
} |
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
""" | |
Find a dict (plan) in a list based on the 'key' key. | |
""" | |
ORG_PLANS = [ | |
{ | |
'key': "schoolzone", | |
'name': 'School Zone', | |
'seats': 3, | |
'price': 9 |
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
""" | |
My calls into your API. | |
""" | |
def finalize_org(request, subscription_id, success_or_fail): | |
# HURRAH! | |
def create_org(request, org_type = None): | |
... |
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
# Install dev tools for cherokee installation | |
sudo yum groupinstall "Development Tools" | |
sudo wget http://cherokee-project.com/install && sudo python install | |
# Install a bunch of def packages for uwsgi install correctly | |
sudo yum install python python-devel libxml2 libxml2-devel python-setuptools zlib-devel wget openssl-devel pcre pcre-devel sudo gcc make autoconf automake | |
# Install UWSGI to /opt/uwsgi/uwsgi | |
cd /opt/ | |
sudo wget http://projects.unbit.it/downloads/uwsgi-0.9.6.5.tar.gz |
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
/** | |
* In your display, you might add the menu widget to the menu panel like so | |
*/ | |
var menu_root = new sd.Widgets.MenuRoot(); | |
menu_root.as_widget().prependTo(menu); | |
menu_root.on_logout_click(function() { | |
sd.Gadget.client.oauth.logout(); | |
sd.Gadget.render_login_page(); | |
sd.Gadget.render_menu(); |