Skip to content

Instantly share code, notes, and snippets.

View rheajt's full-sized avatar
🏠
Working from home

jordan rhea rheajt

🏠
Working from home
View GitHub Profile
@rheajt
rheajt / CODEGENERATOR.gs
Created December 8, 2016 17:44
CODEGENERATOR
function CODEGENERATOR() {
var allCodes = []; // get all of the codes from all of the teacher sheets
var letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p'];
var codeLen = 7;
var code = '';
for(var i = 0; i < codeLen; i++) {
var randNum = Math.floor(Math.random() * 9);
function doGet() {
//get the data from the spreadsheet into a multidimensional array
var data = SpreadsheetApp.getActiveSheet().getDataRange().getValues();
//take the first row of header information and save it into its own array
var header = data.shift();
//create an empty array to store our objects after we build them
var apiData = [];
@rheajt
rheajt / mediaquery.sass
Created December 30, 2016 08:50
media queries from skeleton css
/* Larger than mobile */
@media (min-width: 400px)
/* Larger than phablet */
@media (min-width: 550px)
/* Larger than tablet */
@media (min-width: 750px)
/* Larger than desktop */
@rheajt
rheajt / readme.md
Last active June 20, 2019 18:13
sass setup for create-react-app cli tool

Create-React-App with Sass configuration

Here are instructions for add Sass support to an app built with create-react-app. Hopefully this will be redundant when Sass support is built into the tool! Visit their form and let them know you need Sass support.

Install the create-react-app tool from npm. This will be installed globally. We also need to install the loaders needed for webpack, and we will save those as development dependencies.

npm install -g create-react-app

create-react-app your-app-name
cd your-app-name
@rheajt
rheajt / Code.gs
Last active April 27, 2026 14:45
google apps script convert column number to letter
function columnToLetter(column, row) {
var temp, letter = '';
while (column > 0) {
temp = (column - 1) % 26;
letter = String.fromCharCode(temp + 65) + letter;
column = (column - temp - 1) / 26;
}
return letter + row;
}
@rheajt
rheajt / Code.gs
Last active September 6, 2018 06:33
copy filenames into documents on google drive
function copyTitles() {
var folderId = '0Byvt4e0JQrRAMVR2Z0dnZnVhcDA';
var folder = DriveApp.getFolderById(folderId);
var files = folder.getFilesByType(MimeType.GOOGLE_DOCS);
while(files.hasNext()) {
@rheajt
rheajt / index.html
Last active February 15, 2017 07:06
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Javascript Game</title>
<style>
#canvas-container {
text-align: center;
@rheajt
rheajt / readme.md
Created February 23, 2017 06:42
git remote tools

Commit your changes.

project_dir$ git add -A
project_dir$ git commit -am "import changes made"

Now you need to add an upstream remote and pull any changes that have been made while you were working.

@rheajt
rheajt / Code.gs
Created May 19, 2017 19:32
use google forms to schedule your calendar
function onOpen() {
FormApp.getUi().createMenu('SCHEDULER')
.addItem('Setup Form Scheduler', 'setFormId')
.addToUi();
}
function onInstall() {
onOpen();
}
@rheajt
rheajt / Code.gs
Last active May 24, 2017 11:36
copy titles into all documents in a folder
function copyTitles() {
//Replace this variable with the folder id
//you can get the id from the URL
var folderId = 'REPLACE_WITH_FOLDER_ID';
var folder = DriveApp.getFolderById(folderId);
var files = folder.getFilesByType(MimeType.GOOGLE_DOCS);
//this will iterate over every single DOCUMENT in that folder