Skip to content

Instantly share code, notes, and snippets.

Avatar
🎮

John Dean CaptEmulation

🎮
View GitHub Profile
@CaptEmulation
CaptEmulation / Dockerfile
Created Nov 12, 2020
Google Cloud Run Distilbert example
View Dockerfile
# 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
View Auto generated schema for deadwood
{
"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 Aug 26, 2017
Convert morphues game assets to webgl-pano compatible
View gist:b8add0220304e190cbf47caf607ae1fe
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 Jun 7, 2017
Don't Starve Together DST Academy w/ Caves rancher setup
View docker-compose.yml
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 Feb 6, 2016
2014 Bitcoin taxes cost basis and income calculations. Uses Libra Tax files as input
View tax.js
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();
}
View johnny-five-issue-346.js
// 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 Aug 29, 2015
Arduino 20x4 Sainsmart I2C example
View johnny-five-issue-346.c
#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 Jul 25, 2015
Johnny-five parallel 16x2 LCD example
View hello lcd.js
// 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() {
View gist:7844272599d929cd77ec
#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);