Last active
October 13, 2022 07:03
-
-
Save jpreardon/d84a933bfa6e861bcfe8 to your computer and use it in GitHub Desktop.
Revisions
-
jpreardon revised this gist
Mar 31, 2016 . 2 changed files with 5 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ # Simple in/out board # Format: Name | Status | Optional comment (keep it short, keep it clean) # Possible statuses are "In", "Out", "WAH" for work at home, "Offsite" and "Vacation" Mr. Baxter | In Mr. Dobisch | Vacation | Back next week Mr. Kirkeby | Out | In tomorrow Ms. Kubelik | In Mr. Sheldrake | Offsite | Offsite meeting 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 charactersOriginal file line number Diff line number Diff line change @@ -4,14 +4,16 @@ ## Description This is a simple in/out board widget for dashing. No pretty interface for updating one's status, absolutely no authentication and a barely passable widget design. But, it works. Users update a simple text file (see outboard.txt example in this gist) with their status. A handful of common statuses are included, more or less might be needed for particular situation. If you have any questions or problems, leave a comment on [this post](http://jpreardon.com/2014/10/18/simple-inout-board-dashing/). **Updates** 2016-03-31: No functional changes. Only updates to the readme and the addition of some comments explaining how to change the icons on the widget. 2015-12-10: Minor improvements to make the widget less fragile. It now handles imperfect lines in the text input file and the statuses are no longer case sensitive. It will also work with docs from Google Drive, so long as the files can be downloaded directly (not using the web viewer). ## Usage -
jpreardon revised this gist
Mar 31, 2016 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,11 @@ givenstatus = person[1].strip.force_encoding('UTF-8') # Convert the person's status to a cute icon, default to "out" # These are Font Awesome icons, the icons used below can be swapped for # any of the ones defined by the font-awsome.css. View all the available # icons here: http://fortawesome.github.io/Font-Awesome/3.2.1/icons/ # Be totally insensitive, to case case givenstatus.downcase when 'wah' -
jpreardon revised this gist
Dec 11, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -10,9 +10,9 @@ Users update a simple text file (see outboard.txt example in this gist) with the If you have any questions or problems, leave a comment on [this post](http://jpreardon.com/2014/10/18/simple-inout-board-dashing/). **Updates** 2015-12-10: Minor improvements to make the widget less fragile. It now handles imperfect lines in the text input file and the statuses are no longer case sensitive. It will also work with docs from Google Drive, so long as the files can be downloaded directly (not using the web viewer). ## Usage -
jpreardon revised this gist
Dec 11, 2015 . 1 changed file with 9 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,12 +4,16 @@ ## Description This is a (very) poor man's in/out board widget for dashing. No pretty interface for updating one's status, absolutely no authentication and a barely passable widget design. But, it works. Users update a simple text file (see outboard.txt example in this gist) with their status. A handful of common statuses are included, more or less might be needed for particular situation. If you have any questions or problems, leave a comment on [this post](http://jpreardon.com/2014/10/18/simple-inout-board-dashing/). ### Updates 2015-12-10: Minor improvements to make the widget less fragile. It now handles imperfect lines in the text input file and the statuses are no longer case sensitive. It will also work with docs from Google Drive, so long as the files can be downloaded directly (not using the web viewer). ## Usage Install from this gist by running @@ -20,7 +24,7 @@ Or, if you'd rather install manually, create a '/widgets/outboard' directory and - `outboard.html` - `outboard.coffee` - `outboard.scss` Also, copy the `outboard.rb` file in your `/jobs` folder. @@ -32,9 +36,9 @@ To include the widget in a dashboard, add the following snippet to the dashboard ## Settings You'll need to have a text file which is accessible to both the Dashing server and the users that will be updating it. Dropbox and Google Drive both work well for this. You can use the 'outboard.txt' included in this gist as an example, but you can name it whatever you wish. Add the path to that text file to your 'config.ru' file. It should be within the configure block. set :outboard_file, 'http://example.com/path/to/your/outboard.txt' The in/out widget is updated every minute. If this is too aggressive for your needs, you can update the frequency in the outboard.rb job file. -
jpreardon revised this gist
Dec 11, 2015 . 1 changed file with 11 additions and 9 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -17,25 +17,27 @@ people.each do |line| # Ignore comments and blank lines # also ensure there's at least one delimiter and data if !line.match(/^\s*(#|$)/) && line.match(/.\|./) # Split the line into an array and populate variables person = line.split('|') name = person[0].strip.force_encoding('UTF-8') givenstatus = person[1].strip.force_encoding('UTF-8') # Convert the person's status to a cute icon, default to "out" # Be totally insensitive, to case case givenstatus.downcase when 'wah' icon = 'icon-home' status = 'in' when 'vacation' icon = 'icon-plane' status = 'out' when 'in' icon = 'icon-star' status = 'in' when "offsite" icon = 'icon-glass' status = 'in' else @@ -48,7 +50,7 @@ comment = person[2].force_encoding('UTF-8') end # Push the status into the array values.push({ :name => name, :status => status, :comment => comment, :icon => icon }) end end @@ -60,4 +62,4 @@ rescue => err puts "outboard.rb: #{err}" end end -
jpreardon revised this gist
Dec 10, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -27,7 +27,7 @@ Also, copy the `outboard.rb` file in your `/jobs` folder. To include the widget in a dashboard, add the following snippet to the dashboard layout file: <li data-row="1" data-col="1" data-sizex="1" data-sizey="1"> <div data-id="outboard" data-view="Outboard" data-title="Who's Where"></div> </li> ## Settings -
jpreardon revised this gist
Dec 10, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -32,7 +32,7 @@ To include the widget in a dashboard, add the following snippet to the dashboard ## Settings You'll need to have a text file which is accessable to both the Dashing server and the users that will be updating it. Dropbox and Google Drive both work well for this. You can use the 'outboard.txt' included in this gist as an example, but you can name it whatever you wish. Add the path to that text file to your 'config.ru' file. It should be within the configure block. set :outboard_file, 'http://example.com/path/to/your/outboard.txt' -
jpreardon revised this gist
Dec 10, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,8 +6,8 @@ begin # Fetch the file uri = URI(settings.outboard_file) # Put the file contents into an array, force encoding and delete is here to support Google Drive files people = Net::HTTP.get_response(uri).body.force_encoding('UTF-8').encode('UTF-8').delete("^\u{0000}-\u{007F}").split(/\n|\r\n/) # Create an array to hold the values we are sending back to the widget values = Array.new -
jpreardon revised this gist
May 5, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -56,7 +56,7 @@ # Send to dashboard send_event('outboard', :values => values) rescue NoMethodError => err puts "outboard.rb: Something's wrong with the text input file. Check your text file and make sure it's referenced in your config.ru file" rescue => err puts "outboard.rb: #{err}" end -
jpreardon revised this gist
May 5, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -16,8 +16,8 @@ people.sort! people.each do |line| # Ignore comments and blank lines unless line.match(/^\s*(#|$)/) # Split the line into an array and populate variables person = line.split('|') -
jpreardon revised this gist
May 4, 2015 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -55,7 +55,9 @@ # Send to dashboard send_event('outboard', :values => values) rescue NoMethodError => err puts "outboard.rb: Can not find outboard.txt file, check your config.ru file" rescue => err puts "outboard.rb: #{err}" end end -
jpreardon revised this gist
Oct 18, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,6 +8,8 @@ This is a (very) poor man's in/out board widget for dashing. No pretty interface Users update a simple text file (see outboard.txt example in this gist) with their status. A handful of common statuses are included, more or less might be needed for particular situation. If you have any questions or problems, leave a comment on [this post](http://jpreardon.com/2014/10/18/simple-inout-board-dashing/). ## Usage Install from this gist by running -
jpreardon revised this gist
Oct 15, 2014 . 1 changed file with 3 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -14,9 +14,7 @@ Install from this gist by running dashing install d84a933bfa6e861bcfe8 Or, if you'd rather install manually, create a '/widgets/outboard' directory and copy the following files into it: - `outboard.html` - `outboard.coffee` @@ -36,4 +34,5 @@ You'll need to have a text file which is accessable to both the Dashing server a Add the path to that text file to your 'config.ru' file. It should be within the configure block. set :outboard_file, 'http://example.com/path/to/your/outboard.txt' The in/out wiget is updated every minute. If this is too aggressive for your needs, you can update the frequency in the outboard.rb job file. -
jpreardon revised this gist
Oct 15, 2014 . 1 changed file with 34 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,39 @@ ## Preview  ## Description This is a (very) poor man's in/out board widget for dashing. No pretty interface for updating one's status, absolutly no authentication and a barely passable widget design. But, it works. Users update a simple text file (see outboard.txt example in this gist) with their status. A handful of common statuses are included, more or less might be needed for particular situation. ## Usage Install from this gist by running dashing install d84a933bfa6e861bcfe8 - or - Install manually by creating a '/widgets/outboard' directory and copying the following files into it: - `outboard.html` - `outboard.coffee` - `outboard.scss` Also, copy the `outboard.rb` file in your `/jobs` folder. To include the widget in a dashboard, add the following snippet to the dashboard layout file: <li data-row="1" data-col="1" data-sizex="1" data-sizey="1"> <div data-id="outboard" data-view="Outboard"></div> </li> ## Settings You'll need to have a text file which is accessable to both the Dashing server and the users that will be updating it. Dropbox works well for this. You can use the 'outboard.txt' included in this gist as an example, but you can name it whatever you wish. Add the path to that text file to your 'config.ru' file. It should be within the configure block. set :outboard_file, 'http://example.com/path/to/your/outboard.txt' -
jpreardon revised this gist
Oct 15, 2014 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,9 @@ # Simple In/Out Board for Dashing This is a (very) poor man's in/out board widget for dashing. No pretty interface for updating one's status, absolutly no authentication and a barely passable widget design. But, it works. <img src="http://jpreardon.com/wp-content/uploads/2014/10/in-out-board-screenshot-251x300.png"> ## Installation Instructions dashing install d84a933bfa6e861bcfe8 -
jpreardon revised this gist
Oct 15, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Simple In/Out Board for Dashing This is a (very) poor man's in/out board widget for dashing. No pretty interface for updating one's status, absolutly no authentication and a bearly passable widget. But, it works. -
jpreardon revised this gist
Oct 15, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,6 @@ This is a (very) poor man's in/out board widget for dashing. No pretty interface for updating one's status, absolutly no authentication and a bearly passable widget. But, it works. <img src="http://jpreardon.com/wp-content/uploads/2014/10/in-out-board-screenshot-251x300.png"> Requirements and instructions to come... -
jpreardon revised this gist
Oct 15, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,4 +2,6 @@ This is a (very) poor man's in/out board widget for dashing. No pretty interface for updating one's status, absolutly no authentication and a bearly passable widget. But, it works. <img src="http://jpreardon.com/wp-content/uploads/2014/10/in-out-board-screenshot.png"> Requirements and instructions to come... -
jpreardon revised this gist
Oct 15, 2014 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,5 +2,8 @@ # Format: Name | Status | Optional comment (keep it short, keep it clean) # Possible statuses are "In", "Out", "WAH" for work at home, "Offsite" and "Vacation" Mr. Baxter | In Mr. Dobisch | Vacation | Back next week Mr. Kirkeby | Out | In tomorrow Ms. Kubelik | In Mr. Sheldrake | Offsite | Offsite meeting -
jpreardon revised this gist
Oct 14, 2014 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ # Poor man's in/out board # Format: Name | Status | Optional comment (keep it short, keep it clean) # Possible statuses are "In", "Out", "WAH" for work at home, "Offsite" and "Vacation" Ms. Example | Out | Back tomorrow Mr. Roboto | In -
jpreardon revised this gist
Oct 14, 2014 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ # Poor Man's In/Out Board for Dashing This is a (very) poor man's in/out board widget for dashing. No pretty interface for updating one's status, absolutly no authentication and a bearly passable widget. But, it works. Requirements and instructions to come... -
jpreardon revised this gist
Oct 14, 2014 . 4 changed files with 139 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ class Dashing.Outboard extends Dashing.Widget ready: -> # This is fired when the widget is done being rendered onData: (data) -> # Handle incoming data # You can access the html node of this widget with `@node` # Example: $(@node).fadeOut().fadeIn() will make the node flash each time data comes in. 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ <h1 class="title" data-bind="title"></h1> <div class="content"> <ul> <li data-foreach-value="values" data-bind-class="value.status"> <i data-bind-class="value.icon"></i> <span class="name" data-bind="value.name"></span> <span class="comment" data-bind="value.comment"></span> </li> </ul> </div> <p class="updated-at" data-bind="updatedAtMessage"></p> 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,61 @@ require 'net/http' require 'uri' # :first_in sets how long it takes before the job is first run. In this case, it is run immediately SCHEDULER.every '1m', :first_in => 0 do |job| begin # Fetch the file uri = URI(settings.outboard_file) # Put the file contents into an array people = Net::HTTP.get_response(uri).body.split(/\n/) # Create an array to hold the values we are sending back to the widget values = Array.new # Sort the array (by name) people.sort! people.each do |line| # Ignore comment and blank lines if line[0] != '#' && !line.empty? # Split the line into an array and populate variables person = line.split('|') name = person[0].strip.force_encoding('UTF-8') givenstatus = person[1].strip.force_encoding('UTF-8') # Figure out what the person's status is, default to "out" case givenstatus when 'WAH' icon = 'icon-home' status = 'in' when 'Vacation' icon = 'icon-plane' status = 'out' when 'In' icon = 'icon-star' status = 'in' when "Offsite" icon = 'icon-glass' status = 'in' else icon = 'icon-remove' status = 'out' end # If a comment exists, get it if person[2] comment = person[2].force_encoding('UTF-8') end # Push the status into the values.push({ :name => name, :status => status, :comment => comment, :icon => icon }) end end # Send to dashboard send_event('outboard', :values => values) rescue => err puts "Exception: #{err}" end 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,56 @@ // ---------------------------------------------------------------------------- // Sass declarations // ---------------------------------------------------------------------------- $background-color: rgba(135, 135, 135, 0.7); $title-color: rgba(255, 255, 255, 0.7); $in-color: rgba(255, 255, 255, 1.0); $out-color: rgba(175, 175, 175, 1.0); $updated-at-color: rgba(255, 255, 255, 0.7); .widget-outboard { background-color: $background-color; .content { text-align: left; } .title { color: $title-color; position: absolute; top: 18px; left: 0; right: 0; } .updated-at { color: $updated-at-color; } &.large h3 { font-size: 65px; } li { font-size: 15px; margin-top: 8px; text-indent: 10px; font-weight: normal; } .name { font-weight: bold; } .comment { font-style: italic; } .in { color: $in-color; } .out { color: $out-color; } } -
jpreardon created this gist
Oct 14, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ # Outboard This is a poor man's in/out board widget.