Skip to content

Instantly share code, notes, and snippets.

View bengm's full-sized avatar

Ben Morris bengm

View GitHub Profile
@bengm
bengm / language.md
Last active April 16, 2021 21:42
List of preferred words/phrases

A number of phrases have worked their way into our language to the point we can't easily hear how they might cause others to feel uneasy. Good-hearted, well-intentioned people often use these phrases. I don't judge people that do. However, we all can put forward an effort to choose better words when we communicate. In fact, many of the alternatives do a far better job of communicating a concept.

To help shape better language in your communities, you can:

  1. Replace your own usage of terms
  2. Give direct constructive feedback to those that employ such terms ("Jim, I noticed you had written that the holiday party was 'crazy' last year. I know you didn't mean it that way, but some people with mental illness might be thrown by that usage. Perhaps 'wild' would do just as well next time.")
  3. Correct or redirect usage of terms in the course of a discussion ("We can develop a black list of IP addresses." ... "Great idea. If it's OK with you, I suggest we use the term blocked list to be more direct and inclusive.")
@bengm
bengm / clamav-mac.md
Created February 21, 2017 21:02 — forked from Uchean/clamav-mac.md
Get ClamAV running on Mac OS X (using Homebrew)

Get ClamAV running on Mac OS X (using Homebrew)

The easiest way to get the ClamAV package is using Homebrew

$ brew install clamav

Before trying to start the clamd process, you'll need a copy of the ClamAV databases.

Create a freshclam.conf file and configure as so

Elementary Level Hour of Code

Computer science education week runs from December 5-11, 2017. The Hour of Code is popular in schools, with past participation by Falls Church City Public Schools. Coding/programming is a major component of Science, Technology, Engineering and Math (STEM, or SEAM adding "Arts") education initiatives.

2016 Hour of Code

Last year, FCCPS organized an hour of code event as an after-school event in the TJ elementary cafeteria. The format was as follows:

  • The cafeteria was laid out with tables (similar to lunch time), and a projector was set up in a central visible location for announcements, etc.
  • FCCPS has multiple carts worth of Macbook Air laptops, and these were set up and at code.org
@bengm
bengm / externship.md
Last active June 4, 2016 19:06
High School Externship

High School Externship

Title: Contribute to Open Source Software

Time: 5 half day sessions (give or take) from June 10 - June 20 2016

Format: At least 3 sessions are be on-site at the company, and each session includes 30-60 minutes of background/tasking/status/feedback.

Who: Students who have some software development/coding background, and an interest in doing more. Could be destined for a software career or not.

@bengm
bengm / endless_drum_solo.rb
Created November 12, 2015 00:34
Playing with creating an endless drum solo in Sonic Pi, iteration 1
# Sonic Pi Reference
bass_drums = [:bd_ada,:bd_pure,:bd_808,:bd_zum,:bd_gas,:bd_sone,:bd_haus,:bd_zome,:bd_boom,:bd_klub,:bd_fat,:bd_tek]
drums = [:drum_heavy_kick,:drum_tom_mid_soft,:drum_tom_mid_hard,:drum_tom_lo_soft,:drum_tom_lo_hard,:drum_tom_hi_soft,:drum_tom_hi_hard,:drum_splash_soft,:drum_splash_hard,:drum_snare_soft,:drum_snare_hard,:drum_cymbal_soft,:drum_cymbal_hard,:drum_cymbal_open,:drum_cymbal_closed,:drum_cymbal_pedal,:drum_bass_soft,:drum_bass_hard]
electric_sounds = [:elec_triangle,:elec_snare,:elec_lo_snare,:elec_hi_snare,:elec_mid_snare,:elec_cymbal,:elec_soft_kick,:elec_filt_snare,:elec_fuzz_tom,:elec_chime,:elec_bong,:elec_twang,:elec_wood,:elec_pop,:elec_beep,:elec_blip,:elec_blip2,:elec_ping,:elec_bell,:elec_flip,:elec_tick,:elec_hollow_kick,:elec_twip,:elec_plip,:elec_blup]
percs = [:perc_bell,:perc_snap,:perc_snap2]
# configuration options
hits_dist = [0,0,1,2,2,2,2,2,2,2,2,2,2,4,4,4,4,8,16]
loop_length = 0.5
bass_drum_set = bass_drums
@bengm
bengm / jsutility.js
Created February 25, 2015 20:58
JavaScript utility functions
function isNumber(val) {
return !isNaN(parseFloat(val)) && isFinite(val);
}
function isDate(val) {
return (!isNumber(val)) && (Date.parse(val)) ? true : false;
}
function isBlank(val) {
// returns true for "", null, etc. -- returns false for 0, 1, "a", etc.
@bengm
bengm / gist:7535223
Created November 18, 2013 21:02
After way too much work, I was able to get history behavior (back button) for bootstrap 3 tabs
$(document).ready(function(){
// bootsrtap tab control setup
$('.nav-tabs a').click(function (e) {
e.preventDefault();
$(this).tab('show');
});
// Manage HISTORY (back button behavior) for tabs
// add a hash to the URL when the user clicks on a tab
// relies on https://github.com/devote/HTML5-History-API/ to support pushState()
$('a[data-toggle="tab"]').on('click', function(e) {
@bengm
bengm / gist:5093104
Last active December 14, 2015 13:28
This is how I got my first set of fast tests running. There are probably a dozen ways to do it better, but this worked for me. I wanted to test some rails helper methods that had simple interfaces and no dependency on rails. Here's how I finally got it working.
# spec/helpers/my_helper_spec.rb
# note: must replace references to my_helper/MyHelper to appropriate name
# require any dependencies - I needed date/time so just included all of active support
require 'active_support/all'
# require the specific helper module
require_relative "../../app/helpers/my_helper.rb"
class DummyClass