Skip to content

Instantly share code, notes, and snippets.

View seejee's full-sized avatar

Chris Geihsler seejee

View GitHub Profile
# Example Usage:
# $('#facey').draggable({
# droppables: '.droppable',
# onDrop: function (droppable) {
# $('#facey').text('DROPPED');
# },
# onNoDrop: function (originalOffset) {
# $('#facey').offset(originalOffset);
# },
# onHover: function(droppable) {

HELLO

HELLO

HELLO

  • 1
  • 2
  • 3
  • 4
describe "after first incorrect attempt" do
before do
drag_item_to_category "apple", "a-f"
drag_item_to_category "orange", "g-n"
drag_item_to_category "watermelon", "o-w"
drag_item_to_category "yak", "o-w"
check_button.click
end
it "marks items with their correctness" do
Student.joins(:classrooms).where(classrooms: { school_id: [15975, 692, 296] }).each do |s|
s.student_settings[:scantron_username] ||= (s.username.length > 16 ? s.username[0..11] + (rand() * 9999).to_i.to_s.rjust(4, '0') : s.username)
end
@seejee
seejee / Ruby.rb
Last active August 29, 2015 14:10
def unreasonable_person?
false
end
class Jenny
def unreasonable_person?
false
end
end
elixir stuff
talk about actor model
- run in their own process
- have a message inbox
- send messages to it, it does work, and then it replies with the result
- sound like an OO object?
- state is hidden from outside world
- each actor handles one message at a time (isolation)
- concurrency by spinning up LOTS of actors that send messages to each other

WARNING - INCOMPLETE AND MIGHT BE WRONG

I'm not a C# dev and haven't gotten one to look at this yet, it might be very very wrong.

C# to Rust Cheat Sheet

The goal of this is to have an easily-scannable reference for the most common syntax idioms in C# and Rust so that programmers most comfortable with C# can quickly get through the syntax differences and feel like they could read and write basic Rust programs.

What do you think? Does this meet its goal? If not, why not?

var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
var canvas2 = document.getElementById('numlinecanvas');
var context2 = canvas2.getContext('2d');
var mouseIsDown = false;
var topKnobOn = false;
var botKnobOn = false;
var circSecs = 1;
@seejee
seejee / etl-description.md
Last active August 29, 2015 14:17
ETL description

Incremental ETL: (every three minutes)

  • rake etl:queue_job puts a ProcessEtlJobWorker on the etl queue.
  • ProcessEtlJobWorker updates all 'base' facts and dimensions.
  • An EtlAggregationWorker job is put on the aggregate queue.
  • Some of the 'aggregate' facts are rebuilt incrementally:
    • AttemptByDateStudentClassroomAggregate: two days of data.
    • LessonCompletedFact: current day's data
    • LessonLeaderboardAggregate: current day's data
    • PointLeaderboardAggregate: current days' data
  • LiveHelpFact: current day's data
@seejee
seejee / dw.md
Last active August 29, 2015 14:22

Reporting Defintion Realignment - Technical Notes

Warehouse schema changes

Create a new "Type 1" SCD from all "Type 2" SCDs

The current schema of the DW optimizes for reporting on the state of a student at the time they performed work rather than their current state. This is primarly caused by the decision to model most of our dimensions as Type 2 SCDs. As students change or move, we write additional rows to the student_dimensions table to represent the new state of that student and leave the original row untouched. For example: