Skip to content

Instantly share code, notes, and snippets.

@johnschimmel
johnschimmel / 1_remote_quick_view.md
Last active November 25, 2023 21:25
Biobidet BB-2000 remote control commands

Button codes

Button (row/col) ENCODING CODE
STOP (1/1) NEC 0xFCFE8000
Posterior Wash (1/2) NEC 0xFCFE4008
F Wash (1/3) NEC 0xFCFEC0C0
Dry wash area (1/4) NEC 0xFCFE2040
Vortex wash ? (2/1) NEC 0xFCFEA0D0
Retract/Nozzle shower (2/2) NEC stopped: FCFEE000
Oscillate during posterior wash(2/2) NEC 0xFCFEE008
@johnschimmel
johnschimmel / serial_read_integers.ino
Created September 28, 2014 18:53
Serial reading in multiple bytes and integer values
/*
http://www.baldengineer.com/blog/2012/07/30/arduino-multi-digit-integers/
*/
unsigned int controllerInputVal=0; // Max value is 65535
char incomingByte;
char controllerInput;
void setup()
{
@johnschimmel
johnschimmel / date_example.html
Created October 25, 2012 15:20
Example of getting Date and Time from HTML5 form
{% extends "layout/main.html" %}
{% block body %}
<div class="row">
<div class="span6">
<form method="POST">
<label for="date">Pick a date</label>
<input type="date" name="date" id="date">
@johnschimmel
johnschimmel / image_to_blobstore.py
Created February 6, 2013 23:05
AppEngine upload, combine images and save to blob store. Python PIL and PIL paste function to give uploaded image a background
# -*- coding: utf-8 -*-
"""
A real simple app for using webapp2 with auth and session.
It just covers the basics. Creating a user, login, logout
and a decorator for protecting certain handlers.
Routes are setup in routes.py and added in main.py
"""
@johnschimmel
johnschimmel / server_simple.js
Created February 7, 2012 12:28
Simple NodeJS web server example
/************************************************
FILENAME
server_simple.js
DESCRIPTION
creates a simple web server that
display "Hello Dynamic World Wide Web"
HOW TO START SERVER:
1) from terminal run 'node simple_server.js'
@johnschimmel
johnschimmel / inTheLifeMediaSearch.php
Created November 7, 2011 18:52
PHP SOAP request using CURL to retrieve In The Life Station listings
<?php
function getListingsViaSoap($zipcode) {
$url = "http://www.tracmedia.com/lol/LOLService.asmx";
$soap_request = '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<InTheLife xmlns="http://tracmedia.org/">
docker run -tid \
--restart unless-stopped \
--name dbpedia-spotlight.en \
--mount source=spotlight-models,target=/opt/spotlight \
-p 2222:80 \
dbpedia/dbpedia-spotlight \
spotlight.sh en
@johnschimmel
johnschimmel / index.html
Last active September 4, 2021 10:35
Demo of loading Google Maps, fetching Markers with AJAX, Geocoding new location and POSTing new location with AJAX. http://dwd-nodejs-remoteapis.herokuapp.com/
<style>
/* IMPORTANT - must give map div height */
#map-canvas {
height:400px;
}
/* IMPORTANT - fixes webkit infoWindow rendering */
#map-canvas img {
max-width: none;
}
@johnschimmel
johnschimmel / jsonify_route.py
Created November 6, 2012 16:12
Sample Flask route to create JSON from Dictionary
from flask import jsonify
@app.route('/data/ideas')
def data_ideas():
# query for the ideas - return oldest first, limit 10
ideas = models.Idea.objects().order_by('+timestamp').limit(10)
if ideas:
@johnschimmel
johnschimmel / ffmpeg.sh
Created May 21, 2021 22:44
ffmpeg embed srt caption
ffmpeg -i funtime.mp4 -f srt -i funtime.srt -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 language=eng funtime_w_captions.mp4