This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// db.episodes.findOne({}) | |
{ | |
"_id" : ObjectId("5e8563a07aeda6f729a56e33"), | |
"data" : { | |
"date_gmt" : "2020-03-30T10:00:08" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource 'definitions' | |
%w(flashcards multichoice type).each do |name| | |
get name, to: "definitions##{name}" | |
### I want to define a 'get' resource within definitions from within here... | |
end | |
#resource 'definitions' do | |
# get 'flashcards' | |
#end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//I want the larger end of this object: | |
translate([-73,0,0]) rotate([0,90,0]) cylinder(h=73, d1=16, d2=0, center=false, $fn=100); | |
// to resemble the corresponding end of this object: | |
intersection() { | |
translate([-73+16/2,0,0]) { | |
difference() { cylinder(h=16, d1=16, d2=16); translate([0,-10,0]) cube(73,16,16); } | |
} | |
translate([-73,0,0]) rotate([0,90,0]) cylinder(h=73, d1=16, d2=0, center=false, $fn=100); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
floppy_location = '/Volumes/floppy' | |
files = Dir['/tmp/Mac OS 8.1/*.img.*'] | |
files.each do |file| | |
puts "#{Time.now}:\t#{file}" | |
# Wait until floppy is mounted... | |
until File.exists?(floppy_location) do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = ` | |
OUT: 1111 | |
OUT: andy | |
OUT: 121 OUT: 1324 | |
NOTOUT: 1114 | |
IN: 144`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <avr/io.h> //Include the headers that handles Input/Output function for AVR chips | |
#include "spi_shift_register.h" | |
#include <util/delay.h> //Include the headers that allow for a delay function | |
#include <avr/interrupt.h> | |
#include <inttypes.h> | |
#include <util/setbaud.h> | |
//#include <stdlib.h> | |
//#include <string.h> | |
#include <stdio.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
starting_point = 0b11011101 | |
ending_point = 0b10111001 | |
bits_to_change = starting_point ^ ending_point #=> "0b01100100" | |
on_bits = ending_point & bits_to_change #=> "0b00100000" | |
off_bits = starting_point & bits_to_change#=> "0b01000100" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* toggle_led_bitmath.c | |
* Description: Uses bitmath to assess an 8 bit register of switches | |
* and notes any recently-depressed switches to toggle | |
* LED lights on a separate register of 8 bits... | |
*/ | |
#define F_CPU 16000000UL //Define the speed the clock is running at. Used for the delay.h functions | |
#include <avr/io.h> //Include the headers that handles Input/Output function for AVR chips |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my_page_data = @pages.collect(&:to_s) | |
my_signed_on_data = my_page_data.group_by{|t| t.match /((?:[A-Z]|-| )+EXTRA BOARD|BLK|RUN)/;$1.strip unless $1.nil?}.reject{|k,v| k.nil?} | |
my_signed_on_data.inject({}) do |memo,obj| | |
obj[1] = obj[1].join "\n" | |
obj[1] = case obj[0] | |
when "BLK" | |
obj[1].scan(/^\s*((?:(?:C|M)_)?\d{4})\s+\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|(.*?)\|.*?\$(\d{4}\.\d{2})\s*\$(\d{4}\.\d{2})/).collect{|blks| Hash[[[:block_number, :saturday, :sunday, :monday, :tuesday, :wednesday, :thursday, :friday, :cap_id, :name, :bi_weekly_pay_school, :bi_weekly_pay_non_school],blks].transpose]} | |
when "RUN" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person < ActiveRecord::Base | |
include Backburner::Performable | |
queue_priority 500 | |
def self.make_person(name, options = {}) | |
self.create name: name, guid: options[:guid] | |
end | |
def self.work |
NewerOlder