Skip to content

Instantly share code, notes, and snippets.

Coding up a storm

Peter Flickinger peterfoxflick

Coding up a storm
Block or report user

Report or block peterfoxflick

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
var key = "xxxxx"; // for trello
var token = "xxxxx"; // for trello
function main() {
//First get all homework assignments
var homework = UrlFetchApp.fetch('');
homework = JSON.parse(homework);
//Now create cards for each one
View Control.rb
require 'benchmark'
%x(rm output.csv)
file ='output.csv', 'a')
10000.times{ |i|
file ='output.csv', 'a')
peterfoxflick / removeFiles.js
Created May 16, 2019
If you need a simple way to remove files from a cluttered folder in canvas this should help do the trick. It only works in chunks of 100. Run with node.js
View removeFiles.js
var Request = require("request");
const folderID = "XXXX"
const access_token = "XXXXXXXXXX"
//Get all the files in a given folder ID and remove them.
function delete100(){
var url = "" + folderID + "/files?access_token=" + access_token + "&per_page=100"
peterfoxflick /
Created Feb 26, 2019
Hidden Row Data: A simple Google Add-on that shows the meta data you save to a row in Google Sheets.
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('Hidden Row Data')
.addItem('Show Data', 'showSidebar')
function showSidebar() {
var html = HtmlService.createTemplateFromFile('sidebar');
peterfoxflick / CountingUp.rb
Last active Oct 11, 2018
This is for a school project on testing if you can count with the sqrt(2) and (2 + sqrt(2)).
View CountingUp.rb
require 'twitter'
twitter = do |config|
config.consumer_key = "YOUR_CONSUMER_KEY"
config.consumer_secret = "YOUR_CONSUMER_SECRET"
config.access_token = "YOUR_ACCESS_TOKEN"
config.access_token_secret = "YOUR_ACCESS_SECRET"
def getA(n)
peterfoxflick / AttinyFlowerPot.ino
Created Aug 11, 2018
The code for a flower pot that has a built-in sensor to detects when the soil is dry and lets you know. The circuit uses an ATtiny85 as the brain and copper tape as the sensor.
View AttinyFlowerPot.ino
ATtiny Indoor Plant
This program flashes a blue light when there is dry dirt.
Pin OUT (only pins that are shown are used)
--[[()]]-- 5V
A3 --[[[]]]--
peterfoxflick / AttinyDarkDetector.ino
Created Aug 11, 2018
This little project makes an ATtiny tell you when it is dark or bright. This project is an excellent introduction to the capabilities of the ATtiny85 chip.
View AttinyDarkDetector.ino
ATtiny Dark Detector
This program turns on a green light when it is bright.
and a red light when it is dark.
Pin OUT (only shows pins used)
--[[()]]-- 5V
--[[[]]]-- A1
peterfoxflick / Change All Sheets
Created Jul 18, 2018
This script take a list of sheets by ID and will iterate through each one. I found this helpful when needing to apply changes to a large number of sheets. If you set it up to run every hour or fifteen minutes it can change as many as you need. If the script times out, it will begin where it left off the next time it runs.
View Change All Sheets
function changeAll() {
//Insert the id of the sheet that contains all the spreadsheets by id
var msheet = SpreadsheetApp.openById('---').getSheetByName("Sheet Ids");
var mdata = msheet.getRange('C:C').getValues();
//m-varname is the master data
var startd = new Date();
var diff = 0;
//Start keeps track of what row you are on incase the script times out.
peterfoxflick / Google Form to Trello
Last active Aug 11, 2018
This code takes a google form and makes a Trello card on each submit. It then creates a copy of a google sheet and folder. These are then linked to the Trello card and are partial filled out.
View Google Form to Trello
* This code create a trello card for every Google Form that is
* filled out with information given on the form. Each trello
* card is linked to a sheet that resides in its own folder.
* for a live example see:
* Author: Peter Fox Flick
peterfoxflick /
Last active Jun 15, 2018
Trello Card Counter

Trello Count

This is program will do two things:

  1. Count the number of trello cards in each list on a board
  2. Add compleated courses to a spreadsheet in google This code is ran as a google script.
function countTrello() {
  // Trello api key found at:
  var key = '';
You can’t perform that action at this time.