Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit 421d8c6273d8cd7d1f3d3802ca58b7ac4afcf4f6 @rkononov rkononov committed Apr 2, 2012
Showing with 4,627 additions and 0 deletions.
  1. +31 −0 README.markdown
  2. +7 −0 config.ini
  3. +40 −0 css/jquery.snippet.min.css
  4. 0 favicon.ico
  5. BIN fonts/gillsans.eot
  6. BIN fonts/gillsans.otf
  7. +1,572 −0 fonts/gillsans.svg
  8. BIN fonts/gillsans.ttf
  9. BIN fonts/gillsans.woff
  10. BIN images/ajax-loader-circle.gif
  11. BIN images/ajax-loader.gif
  12. BIN images/ajax-loader.png
  13. BIN images/arrow-left.png
  14. BIN images/arrow-right.png
  15. BIN images/body-lines.png
  16. BIN images/body-noise.png
  17. BIN images/box-connection.png
  18. +31 −0 images/gear-big-shadow.svg
  19. +20 −0 images/gear-big.svg
  20. +25 −0 images/gear-small-shadow.svg
  21. +18 −0 images/gear-small.svg
  22. BIN images/gears-bg.png
  23. BIN images/github-icon.png
  24. BIN images/image-icon-for-process.png
  25. BIN images/image-icon-processed.png
  26. BIN images/samples/__walle.png
  27. BIN images/samples/android.png
  28. BIN images/samples/calculon.png
  29. BIN images/samples/irondog.png
  30. BIN images/samples/r2d2.png
  31. BIN images/samples/transformer.png
  32. BIN images/samples/walle.png
  33. BIN images/step-1-bg.png
  34. BIN images/step-3-bg.png
  35. BIN images/stretch-line.png
  36. BIN images/stripe-gradient.png
  37. +419 −0 index.php
  38. +30 −0 iw/queueWorker.php
  39. +12 −0 javascripts/jquery.snippet.min.js
  40. +463 −0 lib/IronMQ.class.php
  41. +4 −0 lib/IronMQWrapper.php
  42. +759 −0 lib/IronWorker.class.php
  43. +4 −0 lib/IronWorkerWrapper.php
  44. +10 −0 mq/getMessage.php
  45. +7 −0 mq/postMessage.php
  46. +630 −0 style.css
  47. +62 −0 workers/imageWorker.php
  48. +20 −0 workers/lib/Imgur.php
  49. +463 −0 workers/lib/IronMQ.class.php
@@ -0,0 +1,31 @@
+#Getting Started
+
+1. Set up proper credentials in config.ini (iron_worker,iron_mq and s3)
+2. Deploy to Phpfog or CloudControl
+3. Add any picture to IronMQ queue or in input box
+4. Wait until picture processed
+5. Profit!
+
+##How to install app on clouds:
+
+###AppFog
+- Create new Appfog cloud and new app
+- Clone Appfog app - 'git clone git_appgfog_path' (check Source Code section of Appfog)
+- Clone this repo 'git clone https://github.com/rkononov/php_example.git'
+- Copy all files from this repo folder to appfog application folder - 'cp php_example/* your_appfog_folder/ -r'
+- Set proper credentials in config.ini (you could get token and project_id from https://hud.iron.io/)
+- Redeploy appfog app - 'git add -A;git commit -m "first deploy";git push'
+- Open your app url in browser (you should see smth like this http://imageworkerdemo.phpfogapp.com/)
+
+###CloudControl
+- Install cctrlapp: 'sudo easy_install cctrl'
+- Make folder for cloudcontrol app - 'mkdir cloudcontrol_app_folder'
+- Clone this repo 'git clone https://github.com/rkononov/php_example.git'
+- Copy all files from this repo folder to cloudcontrol_app_folder - 'cp php_example/* cloudcontrol_app_folder/ -r'
+- Set proper credentials in config.ini (you could get token and project_id from https://hud.iron.io/)
+- Go into cloudcontrol_app_folder - 'cd cloudcontrol_app_folder'
+- Create app -'cctrlapp APP_NAME create php'
+- Commit app - 'git add -A;git commit -m "first deploy"
+- Push app - 'cctrlapp APP_NAME/DEP_NAME push'
+- Deploy app - 'cctrlapp APP_NAME/DEP_NAME deploy'
+- Open your app url in browser (you should see smth like this http://iron2.cloudcontrolled.com/)
@@ -0,0 +1,7 @@
+[iron_mq]
+token = ogIkJIiZ7kR
+project_id = 4eba4f
+
+[iron_worker]
+token = ogIkJIiZ7kR
+project_id = 4eba4f3c
Oops, something went wrong.
No changes.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="116px" height="116px" viewBox="0 0 116 116" enable-background="new 0 0 116 116" xml:space="preserve">
+
+ <defs>
+ <filter id="f1" x="0" y="0" width="200%" height="200%">
+ <!-- <feOffset result="offOut" in="SourceGraphic" dx="0" dy="1" /> -->
+ <feGaussianBlur result="blurOut" in="SourceGraphic" stdDeviation="2" />
+ <feBlend in="SourceGraphic" in2="blurOut" mode="normal" />
+ </filter>
+ </defs>
+
+ <g filter="url(#f1)">
+ <path fill="#fff" d="M57.998,30.937c-14.868,0-26.921,12.051-26.921,26.92c0,14.87,12.051,26.92,26.921,26.92
+ c14.869,0,26.921-12.051,26.921-26.92C84.919,42.987,72.863,30.937,57.998,30.937z M57.998,74.95
+ c-9.44,0-17.093-7.652-17.093-17.093c0-9.44,7.652-17.093,17.093-17.093c9.439,0,17.094,7.653,17.094,17.093
+ C75.092,67.298,67.438,74.95,57.998,74.95z"/>
+ <path fill="#fff" d="M104.492,64.842c0.322-2.232,0.496-4.515,0.496-6.843c0-2.325-0.174-4.609-0.5-6.843l10.271-6.058
+ l-3.257-10.025L99.63,36.21c-2.139-4.079-4.856-7.803-8.047-11.065l4.754-10.95L87.809,8l-8.935,7.899
+ c-4.047-2.01-8.417-3.451-13.021-4.226L63.266,0.027H52.727l-2.589,11.646c-4.601,0.775-8.975,2.216-13.018,4.226L28.187,8
+ l-8.528,6.196l4.754,10.948c-3.191,3.263-5.91,6.988-8.047,11.065L4.493,35.072L1.234,45.095l10.274,6.06
+ c-0.327,2.234-0.501,4.518-0.501,6.842c0,2.325,0.175,4.61,0.501,6.844L1.234,70.898l3.258,10.027l11.874-1.138
+ c2.139,4.078,4.856,7.802,8.047,11.063l-4.754,10.949l8.529,6.195l8.935-7.898c4.043,2.01,8.415,3.452,13.016,4.227l2.588,11.648
+ h10.539l2.59-11.647c4.603-0.774,8.973-2.218,13.02-4.226l8.934,7.896l8.53-6.191l-4.754-10.951
+ c3.19-3.264,5.908-6.987,8.047-11.063l11.873,1.138l3.261-10.025L104.492,64.842z M57.998,93.654
+ c-19.694,0-35.655-15.965-35.655-35.656c0-19.693,15.964-35.654,35.655-35.654c19.689,0,35.656,15.959,35.656,35.654
+ C93.652,77.693,77.689,93.654,57.998,93.654z"/>
+ </g>
+</svg>
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="116px" height="116px" viewBox="0 0 116 116" enable-background="new 0 0 116 116" xml:space="preserve">
+<path fill="#6D768A" d="M57.998,30.937c-14.868,0-26.921,12.051-26.921,26.92c0,14.87,12.051,26.92,26.921,26.92
+ c14.869,0,26.921-12.051,26.921-26.92C84.919,42.987,72.863,30.937,57.998,30.937z M57.998,74.95
+ c-9.44,0-17.093-7.652-17.093-17.093c0-9.44,7.652-17.093,17.093-17.093c9.439,0,17.094,7.653,17.094,17.093
+ C75.092,67.298,67.438,74.95,57.998,74.95z"/>
+<path fill="#6D768A" d="M104.492,64.842c0.322-2.232,0.496-4.515,0.496-6.843c0-2.325-0.174-4.609-0.5-6.843l10.271-6.058
+ l-3.257-10.025L99.63,36.21c-2.139-4.079-4.856-7.803-8.047-11.065l4.754-10.95L87.809,8l-8.935,7.899
+ c-4.047-2.01-8.417-3.451-13.021-4.226L63.266,0.027H52.727l-2.589,11.646c-4.601,0.775-8.975,2.216-13.018,4.226L28.187,8
+ l-8.528,6.196l4.754,10.948c-3.191,3.263-5.91,6.988-8.047,11.065L4.493,35.072L1.234,45.095l10.274,6.06
+ c-0.327,2.234-0.501,4.518-0.501,6.842c0,2.325,0.175,4.61,0.501,6.844L1.234,70.898l3.258,10.027l11.874-1.138
+ c2.139,4.078,4.856,7.802,8.047,11.063l-4.754,10.949l8.529,6.195l8.935-7.898c4.043,2.01,8.415,3.452,13.016,4.227l2.588,11.648
+ h10.539l2.59-11.647c4.603-0.774,8.973-2.218,13.02-4.226l8.934,7.896l8.53-6.191l-4.754-10.951
+ c3.19-3.264,5.908-6.987,8.047-11.063l11.873,1.138l3.261-10.025L104.492,64.842z M57.998,93.654
+ c-19.694,0-35.655-15.965-35.655-35.656c0-19.693,15.964-35.654,35.655-35.654c19.689,0,35.656,15.959,35.656,35.654
+ C93.652,77.693,77.689,93.654,57.998,93.654z"/>
+</svg>
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="69px" height="69px" viewBox="0 0 69 69" enable-background="new 0 0 69 69" xml:space="preserve">
+
+ <defs>
+ <filter id="f1" x="0" y="0" width="200%" height="200%">
+ <!-- <feOffset result="offOut" in="SourceGraphic" dx="0" dy="1" /> -->
+ <feGaussianBlur result="blurOut" in="SourceGraphic" stdDeviation="2" />
+ <feBlend in="SourceGraphic" in2="blurOut" mode="normal" />
+ </filter>
+ </defs>
+
+ <g filter="url(#f1)">
+ <path fill="#fff" d="M68.75,38.5v-8.25l-10.771-2.691c-0.513-1.777-1.209-3.474-2.09-5.061l5.709-9.512l-5.834-5.834
+ l-9.516,5.71c-1.585-0.876-3.28-1.569-5.055-2.081L38.5,0h-8.25l-2.696,10.786c-1.77,0.512-3.46,1.207-5.041,2.081l-9.529-5.716
+ L7.15,12.985l5.72,9.532c-0.872,1.578-1.563,3.267-2.074,5.035L0,30.25v8.25l10.796,2.698c0.51,1.768,1.202,3.456,2.074,5.034
+ l-5.717,9.533l5.833,5.832l9.528-5.715c1.581,0.875,3.271,1.569,5.042,2.081L30.25,68.75h8.25l2.693-10.779
+ c1.774-0.512,3.47-1.207,5.057-2.082l9.516,5.709l5.832-5.832l-5.705-9.513c0.877-1.587,1.574-3.285,2.088-5.062L68.75,38.5z
+ M34.386,48.561c-7.834,0-14.188-6.351-14.188-14.186s6.354-14.186,14.187-14.186c7.836,0,14.188,6.352,14.188,14.186
+ C48.572,42.21,42.221,48.561,34.386,48.561z"/>
+ <circle fill="#fff" cx="34.386" cy="34.375" r="7.182"/>
+ </g>
+</svg>
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="69px" height="69px" viewBox="0 0 69 69" enable-background="new 0 0 69 69" xml:space="preserve">
+
+ <g>
+ <path fill="#6D768A" d="M68.75,38.5v-8.25l-10.771-2.691c-0.513-1.777-1.209-3.474-2.09-5.061l5.709-9.512l-5.834-5.834
+ l-9.516,5.71c-1.585-0.876-3.28-1.569-5.055-2.081L38.5,0h-8.25l-2.696,10.786c-1.77,0.512-3.46,1.207-5.041,2.081l-9.529-5.716
+ L7.15,12.985l5.72,9.532c-0.872,1.578-1.563,3.267-2.074,5.035L0,30.25v8.25l10.796,2.698c0.51,1.768,1.202,3.456,2.074,5.034
+ l-5.717,9.533l5.833,5.832l9.528-5.715c1.581,0.875,3.271,1.569,5.042,2.081L30.25,68.75h8.25l2.693-10.779
+ c1.774-0.512,3.47-1.207,5.057-2.082l9.516,5.709l5.832-5.832l-5.705-9.513c0.877-1.587,1.574-3.285,2.088-5.062L68.75,38.5z
+ M34.386,48.561c-7.834,0-14.188-6.351-14.188-14.186s6.354-14.186,14.187-14.186c7.836,0,14.188,6.352,14.188,14.186
+ C48.572,42.21,42.221,48.561,34.386,48.561z"/>
+ <circle fill="#6D768A" cx="34.386" cy="34.375" r="7.182"/>
+ </g>
+
+</svg>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Oops, something went wrong.

0 comments on commit 421d8c6

Please sign in to comment.