Skip to content

Instantly share code, notes, and snippets.

View CaptEmulation's full-sized avatar
🎮

John Dean CaptEmulation

🎮
View GitHub Profile
@CaptEmulation
CaptEmulation / Dockerfile
Created November 12, 2020 17:12
Google Cloud Run Distilbert example
# Use the official lightweight Python image.
# https://hub.docker.com/_/python
FROM python:3.7-slim
# Allow statements and log messages to immediately appear in the Knative logs
ENV PYTHONUNBUFFERED True
# Copy local code to the container image.
ENV APP_HOME /app
WORKDIR $APP_HOME
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://sandboxvr.com/schema/gamedata.json",
"type": "object",
"title": "The GameData Schema",
"required": [
"experience",
"team",
"members",
@CaptEmulation
CaptEmulation / gist:b8add0220304e190cbf47caf607ae1fe
Last active August 26, 2017 21:19
Convert morphues game assets to webgl-pano compatible
const _ = require('lodash');
const fs = require('fs');
const runSequence = require('run-sequence');
const mkdirp = require('mkdirp');
const gulp = require('gulp');
const gulpFileProcess = require('gulp-file-process');
const path = require('path');
const exec = require('child_process').exec;
const AWS = require('aws-sdk');
const canvas = require('./canvas');
@CaptEmulation
CaptEmulation / docker-compose.yml
Last active June 7, 2017 18:29
Don't Starve Together DST Academy w/ Caves rancher setup
version: '2'
volumes:
dst-data-volume:
external: true
driver: 'null'
services:
dst-data-volume:
image: busybox
network_mode: none
volumes:
@CaptEmulation
CaptEmulation / tax.js
Last active February 6, 2016 02:49
2014 Bitcoin taxes cost basis and income calculations. Uses Libra Tax files as input
var argv = require('minimist')(process.argv.slice(2));
var fs = require('fs');
var csvParse = require('csv-parse');
var csvStringify = require('csv-stringify');
var moment = require('moment');
if (argv._.length === 0) {
console.log('Usage: node tax --year 2014 Libra.csv output.csv');
process.exit();
}
// For interfacing with Arduino
var five = require("johnny-five");
// Initialize a new Johnny-Five board
var board = new five.Board({
port: 'COM11'
});
board.on("ready", function() {
@CaptEmulation
CaptEmulation / johnny-five-issue-346.c
Last active August 29, 2015 14:25
Arduino 20x4 Sainsmart I2C example
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
void setup() {
LiquidCrystal_I2C lcd(0x27, 20, 4);
lcd.init();
lcd.backlight();
lcd.setCursor(5, 0);
lcd.print("Hello from");
@CaptEmulation
CaptEmulation / hello lcd.js
Created July 25, 2015 07:32
Johnny-five parallel 16x2 LCD example
// For interfacing with Arduino
var five = require("johnny-five");
// Initialize a new Johnny-Five board
var board = new five.Board({
port: 'COM11' // or whatever-- auto detection is sometimes finicky for me
});
board.on("ready", function() {
@CaptEmulation
CaptEmulation / gist:7844272599d929cd77ec
Created July 25, 2015 07:29
16x4 arduino sketch snippet
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
lcd.setCursor(5, 0);
lcd.print("Hello");
lcd.setCursor(2, 1);