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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>test</title> | |
| <script src="http://crossrider.com/crossrider.api.js" type="text/javascript"></script> | |
| <script> | |
| crossriderAPI.askForAsyncAppAPI(YOUR_APP_ID, function(appAPI) { | |
| appAPI.db.set(function(){ | |
| alert("db set was completed!"); | |
| }, "db_key", "db_value", appAPI.time.hoursFromNow(1)); |
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 'sinatra' | |
| require 'open-uri' | |
| require 'cgi' | |
| get '/' do | |
| content_type "audio/mpeg" | |
| query_string = params.map{ |k,v| "#{k}=#{CGI.escape(v)}" }.join("&") | |
| uri = "http://translate.google.com/translate_tts?" + query_string | |
| open(uri, "User-Agent" => "Mozilla/5.0") | |
| end |
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.attach = function (url, context, moduleName, onScriptLoad, type, fetchOnlyFunction) { | |
| var xhr; | |
| onScriptLoad = onScriptLoad || function () { | |
| context.completeLoad(moduleName); | |
| }; | |
| xhr = new XMLHttpRequest(); | |
| xhr.open("GET", url, true); | |
| xhr.onreadystatechange = function (e) { | |
| if (xhr.readyState === 4 && xhr.status === 200) { | |
| eval(xhr.responseText); |
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
| convert source.jpg -thumbnail 100x100^ \ | |
| -gravity center -extent 100x100 target.jpg |
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
| convert source.jpg -thumbnail 100x100^ \ | |
| -gravity center -extent 100x100 target.jpg |
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
| for FILE in $(ls); do convert $FILE -thumbnail 100x100^ -gravity center -extent 100x100 "${FILE%.*}.thumbnail.jpg"; done |
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
| for FILE in $(ls *.jpg | grep -v thumbnail); do convert $FILE -resize 800x600 $FILE; done |
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 initJS() { | |
| $.getScript(config.installer.domain + '/apps/files/' + config.installer.app_id + '.js', function() { | |
| $.extend(config.installer, {files:app_files_v2}); | |
| ready = true; | |
| }); | |
| } |
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 'capybara' | |
| require 'sauce/job' | |
| require 'sauce/capybara' | |
| module Spinach | |
| class Scenario | |
| def fail! | |
| @failed = true | |
| end | |
| def failed? |
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 'testingbot/config' | |
| require 'testingbot/capybara' | |
| require 'testingbot/api' | |
| module Spinach | |
| class Scenario | |
| def fail! | |
| @failed = true | |
| end | |
| def failed? |