Skip to content

Instantly share code, notes, and snippets.

View flybayer's full-sized avatar
🤓
CEO Flightcontrol + Pilot

Brandon Bayer flybayer

🤓
CEO Flightcontrol + Pilot
View GitHub Profile
# A Parking Lot Simulation by Brandon Bayer
#
# To run the simulation:
# Create a Lot object and a Car object
# - lot = ParkingLot.new
# - car = Car.new
#
# Use the following Car methods
# - Car#get_ticket(Lot)
# - Car#enter(Lot)
; -------------------------------------------------------------------------------
; This script automatically disconnects and/or connects Tera Term when the
; availability of a specified USB COM port changes.
;
; CONFIGURATION: Set the com ports you want this script to monitor in the
; ProcessUSBchangeEvent function below
;
; USAGE: This script can be ran by itself or included in another script
; with this line: #Include auto_connect_teraterm_usb_com_ports.ahk
;
@flybayer
flybayer / _.md
Last active August 29, 2015 14:26
Tree
@flybayer
flybayer / _.md
Last active August 29, 2015 14:26
Learning
@flybayer
flybayer / _.md
Last active October 7, 2015 01:13
Role Hive
@flybayer
flybayer / challenge.adoc
Last active January 12, 2016 19:46 — forked from cheerfulstoic/graph_gist_template.adoc
My Submission

TODO

  1. Create many more nodes

  2. Create queries for the questions

  3. Review questions & maybe add more or more complexity

  4. Create domain model image

What can I eat for the holidays??

@flybayer
flybayer / start.js
Created August 30, 2016 15:58 — forked from toddgeist/start.js
Using dotenv to load vars when dploying to now. But still keep it out of your repo.
// load as early as possible
if(process.env.NOW){
require('dotenv').config({path:'./.envnow', silent:true});
}else{
require('dotenv').config({silent:true});
}
// now you can deploy with:
//$cp .env .envnow && now && rm -r .envnow
@flybayer
flybayer / convertStringToFile.jsx
Created September 4, 2016 20:12
Create downloadable text file from JavaScript
const convertStringToFile = (aString) => {
const data = new Blob([aString], {type: 'text/plain'})
return window.URL.createObjectURL(data)
}
<a
download="filename.txt"
href={convertStringToFile}
>
Download
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
fontFamily: '"Source Code Pro for Powerline", Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@flybayer
flybayer / machine.js
Created August 8, 2019 15:49
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions