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
/* | |
When an input cell containing text is passed to tweetThread(), the text is broken into tweet-length parts and returned. | |
Optional "includeNum" will add a (X/Y) to each message in the thread. Enabled by default. Set second parameter to false | |
to disable | |
*/ | |
CHARACTER_LIMIT = 280; | |
function tweetThread(txt, includeNum) { |
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
// Converts a given range in Google Sheets to YAML text. | |
function toYaml(range, header_row) { | |
range = range.filter(function(x) { return x[0] != ''}); | |
header_row = header_row || false; | |
var yaml_arr = []; | |
if (header_row == true) { | |
yaml_arr.push("---"); | |
var headers = range.shift(); | |
range.forEach(function(row) { | |
var row_arr = []; |
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 "awesome_print" | |
## TO USE: | |
# 1. Create a new Gradient with the two end colors, and the amount of steps you'd like your gradient to have in between: | |
# -- i.e. gradient = Gradient.new("ffffff", "#d80015", 5) | |
# 2. This will print the gradient to the console, and return a Gradient object. The gradient colors are stored as an array, to access them either type `gradient.output` or run `gradient.generate` | |
# 3. To increase/decrease the number of steps in your gradient, simply run `.generate(steps)` with the new number of steps you'd like to use. i.e. `more_detailed_gradient = gradient.generate(15)`. | |
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
// Run this in the browser console on https://www.fitbit.com/export/user/data | |
// Pre-configured for importing these exports into Garmin Connect (using "Body" and "Activity" data only, and exporting as a CSV. | |
var i = 0; | |
document.getElementById("CUSTOM").checked = true; // Set time period to "Custom" | |
var checkboxes = document.getElementsByClassName("checkboxSpacing"); | |
// Set it to export 'body' and 'activities' metrics. These are the only ones Garmin can import. | |
for (i in checkboxes) { |
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
/* | |
* This is a manifest file that'll be compiled into application.css, which will include all the files | |
* listed below. | |
* | |
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, | |
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. | |
* | |
* You're free to add application-wide styles to this file and they'll appear at the top of the | |
* compiled file, but it's generally better to create a new file per style scope. | |
* |
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
Final Project: | |
05 pts: Create new rails app called DinnerTyme | |
15 pts: Create the model, view and controllers using this screenshot as a reference: | |
http://grab.by/h9sC | |
10 pts: Create a home page (index) using a Home controller | |
10 pts: Create a navigation system (links) at the top of the site |