User
- The FreshBooks account, whose information we are trying to access via OAuthConsumer
- The FreshBooks account, who we authorize to access the user's informationConsumer key
- The consumer's subdomain,consumer_key.freshbooks.com
Consumer Secret
- The consumer's secret, that we will use to make OAuth requests.Request Token
- A value used by the consumer to obtain authorization and an access token from the user.Access Token
- A value used by the consumer to access the user's information.Access Token Secret
- A secret used by the consumer to establish ownership of a given 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
/* | |
* robotNav.js | |
* | |
* The green key is located in a slightly more | |
* complicated room. You'll need to get the robot | |
* past these obstacles. | |
*/ | |
function startLevel(map) { | |
// Hint: you can press R or 5 to "rest" and not move the |
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
#!/bin/bash | |
provider=virtualbox | |
# Loop over boxes | |
for box in ~/.vagrant.d/boxes/*; do | |
# Create provider directory to contain files | |
mkdir $box/$provider/ |
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
# Wrapper for ssh to automatically source bash config file on remote machine. | |
# Sources ~/.bashrc_remote | |
# | |
# author Jonah Dahlquist | |
# license CC0 | |
sshs() { | |
ssh ${*:1} "cat > /tmp/.bashrc_temp" < ~/.bashrc_remote | |
ssh -t ${*:1} "bash --rcfile /tmp/.bashrc_temp ; rm /tmp/.bashrc_temp" | |
} |
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
#!/bin/bash | |
# Example usage | |
# | |
# $ explode dir/ | |
find "$*" -maxdepth 1 -mindepth 1 -exec mv -f {} "$*/../" \; | |
rmdir "$*" |
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
exec { 'bundle install': | |
command => '/usr/local/rvm/bin/rvm 1.9.3@rocci-server do bundle install', | |
cwd => '/home/occi/rocci-server', | |
logoutput => true, | |
} |
If you are using vagrant, you probably-statistically are using git. Make sure you have its binary folder on your path, because that path contains 'ssh.exe'.
Now, modify C:\vagrant\vagrant\embedded\lib\ruby\gems\1.9.1\gems\vagrant-1.0.3\lib\vagrant\ssh.rb
to comment out the faulty Windows check and add a real SSH check:
# if Util::Platform.windows?
# raise Errors::SSHUnavailableWindows, :host => ssh_info[:host],
# :port => ssh_info[:port],
# :username => ssh_info[:username],
# :key_path => ssh_info[:private_key_path]
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
""" | |
jQuery templates use constructs like: | |
{{if condition}} print something{{/if}} | |
This, of course, completely screws up Django templates, | |
because Django thinks {{ and }} mean something. | |
Wrap {% verbatim %} and {% endverbatim %} around those | |
blocks of jQuery templates and this will try its best |
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
define("dojo/store/LocalStorage", ["dojo", "dojo/store/util/QueryResults", "dojo/store/util/SimpleQueryEngine"], function(dojo) { | |
dojo.declare("dojo.store.LocalStorage", null, { | |
constructor: function(/*dojo.store.LocalStorage*/ options){ | |
// summary: | |
// localStorage based object store. | |
// options: | |
// This provides any configuration information that will be mixed into the store. | |
// This should generally include the data property to provide the starting set of data. | |
if (!dojo.global.localStorage){ |
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
/** | |
* $.unserialize | |
* | |
* Takes a string in format "param1=value1¶m2=value2" and returns an object { param1: 'value1', param2: 'value2' }. If the "param1" ends with "[]" the param is treated as an array. | |
* | |
* Example: | |
* | |
* Input: param1=value1¶m2=value2 | |
* Return: { param1 : value1, param2: value2 } | |
* |
NewerOlder