Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save evanbrumley/8329614 to your computer and use it in GitHub Desktop.
Save evanbrumley/8329614 to your computer and use it in GitHub Desktop.

Dashing Installation From Scratch with the FreshDesk Widget

  1. Open Terminal.app

  2. Install RVM: \curl -sSL https://get.rvm.io | bash -s stable --ruby

  3. Get a coffee

  4. Activate RVM: source /Users/<username>/.rvm/scripts/rvm

  5. ruby --version should now give 2.1.0 or similar

  6. Add source /Users/<username>/.rvm/scripts/rvm to your ~/.bash_profile if you don't want to run it every time you open Terminal.app

  7. gem install dashing

  8. Get another coffee

  9. Make a project folder and cd into it

  10. dashing new projectname

  11. cd projectname

  12. bundle

  13. More coffee

  14. dashing start

  15. Try localhost:3030 in your web browser, you should see widgets

  16. Turn off the server with ctrl+c

  17. Edit projectname/dashboards/sample.erb, adding the following widget list item:

    <li data-row="1" data-col="1" data-sizex="2" data-sizey="2">
        <div data-id="freshdesk" data-view="Freshdesk" data-title="Freshdesk Tickets">
    	</div>
    </li>
    

    Alternatively, you can set the html of the entire page to the following if you just want the freshdesk widget:

    <% content_for :title do %>My super sweet dashboard<% end %>
    <div class="gridster">
    	<ul>
    		<li data-row="1" data-col="1" data-sizex="2" data-sizey="2">
    			<div data-id="freshdesk" data-view="Freshdesk" data-title="Freshdesk Tickets"></div>
    		</li>
    	</ul>
    </div>
    
  18. Make a new directory 'freshdesk' under projectname/widgets and cd into it

  19. curl https://gist.github.com/bmease/6706542/raw/17dbe27d1e90e3251ffe967a53998a452e4c6add/freshdesk.coffee > freshdesk.coffee

  20. curl https://gist.github.com/bmease/6706542/raw/1af6d2431b2c72717e07144344724c1dc95d213a/freshdesk.html > freshdesk.html

  21. curl https://gist.github.com/bmease/6706542/raw/6e3ca033160aeee1da89309ca5777e794128133d/freshdesk.scss > freshdesk.scss

  22. cd into the projectname/jobs directory

  23. curl https://gist.github.com/bmease/6706542/raw/7f215f1e0cdadd49fd641d31c59140b22ffca2f2/freshdesk.rb > freshdesk.rb

  24. Edit projectname/jobs/fresh desk.rb and make the necessary changes to FRESHDESK_URL and FRESHDESK_USERNAME (you can get the username/API key from your freshdesk profile page)

  25. dashing start

  26. Try localhost:3030 in your web browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment