Skip to content

Instantly share code, notes, and snippets.

View marksherman's full-sized avatar

Mark Sherman marksherman

  • Emmanuel College
  • Boston, Massachusetts, USA
View GitHub Profile
@marksherman
marksherman / replmgr.js
Created June 16, 2015 16:12
Test block data polling on change
Blockly.ReplMgr.pollYail = function() {
console.log("Mark! pollYail ran\n");
console.log(Blockly.mainWorkspace.getTopBlocks(false));
try {
if (window === undefined) // If window is gone, then we are a zombie timer firing
return; // in a destroyed frame.
} catch (err) { // We get an error on FireFox when window is gone.
return;
@marksherman
marksherman / samethingas.xml
Last active August 29, 2015 14:27
JSON representation of a simple App Inventor block
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="component_event" id="1" x="311" y="510">
<mutation component_type="Button" instance_name="Button1" event_name="Click"></mutation>
<field name="COMPONENT_SELECTOR">Button1</field>
<statement name="DO">
<block type="component_set_get" id="2" inline="false">
<mutation component_type="Button" set_or_get="set" property_name="FontBold" is_generic="false" instance_name="Button1"></mutation>
<field name="COMPONENT_SELECTOR">Button1</field>
<field name="PROP">FontBold</field>
<value name="VALUE">
@marksherman
marksherman / gist:7cd4c65c7ef019c5544cfc48c542ea8a
Created June 20, 2016 17:12
Local server on Master: Files API still in use. "Server error: could not save one or more files. Please try again later!"
SEVERE: javax.servlet.ServletContext log: Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract long com.google.appinventor.shared.rpc.project.ProjectService.save2(java.lang.String,long,java.lang.String,boolean,java.lang.String) throws com.google.appinventor.shared.rpc.InvalidSessionException,com.google.appinventor.shared.rpc.BlocksTruncatedException' threw an unexpected exception: com.google.appengine.tools.cloudstorage.NonRetriableException: com.google.apphosting.api.ApiProxy$FeatureNotEnabledException: The Files API is disabled. Further information: https://cloud.google.com/appengine/docs/deprecations/files_api
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:415)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:605)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:333)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(Remo
#! /usr/bin/env python3
import os
import subprocess
ingore_users = []
def makeCommit(commit_hash, date_unix, date_ISO):
return {'hash' : commit_hash, 'date_unix' : date_unix, 'date_ISO' : date_ISO}
@marksherman
marksherman / readings.js
Created October 25, 2019 19:49
Finding the Largest value in an Array (javascript)
var readings = [0, 5, 9, 18, 2, 9, 5];
// find the largest value in the array 'readings'
var max = 0;
for (var i = 0; i < readings.length; i++) {
if (readings[i] > max) {
max = readings[i];
}
}
console.log('The highest reading is: ' + max);
@marksherman
marksherman / Spring2020Projects.md
Last active May 13, 2020 11:17
Projects from Intro to Programming Spring 2020 at Emmanuel College

Introduction to Programming Projects

Emmanuel College IDDS-1101 🔹 Spring 2020 🔹 Professor Mark Sherman

GitHub Try it link Author(s)
https://github.com/belleagost/PetTheCat https://belleagost.github.io/PetTheCat/ Isabelle Agostinelli
https://github.com/anc17/SpaceCow https://anc17.github.io/SpaceCow/ Emily Andrews & Ashley Conti
https://github.com/vicki1115/SidTheSnake https://vicki1115.github.io/SidTheSnake/ Victoria Servare & Lorhena Antonio
https://github.com/brennanf/Groovy https://brennanf.github.io/Groovy/ Faith Brennan & Jaclyn Kennedy
Marissa Cataldo
@marksherman
marksherman / hotlist.md
Last active March 28, 2024 15:23
Dr. Mark's Personal Security Tools Hot List Spring '24

Preamble

Always investigate services you want to use. Read the Terms of Service and/or the Privacy Policy, as they tell you right there what data they'll be collecting from you and how they'll share that data. Always do your own diligence to find the right tools that best fit your life. Here are my recommendations as of March 2024.

Ad-Blocking

Protects from cross-site ad cookies accessing your browsing history, and protects from advertisers collecting 'breadcrumb' data in general.

  1. uBlock Origin - my favorite ad-blocker. Fully open source and community-run. Fast and efficient. Easy to turn off in a pinch.