Skip to content

Instantly share code, notes, and snippets.

View jeffcrouse's full-sized avatar

Jeff Crouse jeffcrouse

View GitHub Profile
{
"document_tone": {
"tone_categories": [
{
"tones": [
{
"score": 0.272084,
"tone_id": "anger",
"tone_name": "Anger"
},
import subprocess
import time
# Written to run on a Raspberry Pi with an Adafruit PiTFT or similar
# https://www.instagram.com/p/BIavjvSBYE6/
# Be sure to `sudo apt-get install speedtest-cli` before running this
# Save this script to your home directory and add "sudo python /home/pi/speedtest.py &"
# to /etc/rc.local so that it starts automatically on boot
time.sleep(60) # Wait for everything to start up.
var half = duration/2.0;
var s = options.size;
var filters = [ // setpts=2.0*PTS,
util.format("[0:v]setsar=sar=1[open]"),
util.format("[1:v]trim=start=%s:end=%s,crop=in_h:in_h:(in_w/2)-(in_h/2):0,scale=%s:%s,setpts=PTS-STARTPTS,setsar=sar=1[player1]", 1, 3, s, s),
util.format("[1:v]trim=start=%s:end=%s,crop=in_h:in_h:(in_w/2)-(in_h/2):0,scale=%s:%s,setpts=PTS-STARTPTS,setsar=sar=1[player2]", duration-2, duration, s, s),
util.format("[2:v]setpts=PTS-STARTPTS,setsar=sar=1[horse1]"),
util.format("[3:v]setpts=PTS-STARTPTS,setsar=sar=1[horse2]"),
util.format("[4:v]setpts=PTS-STARTPTS,setsar=sar=1[close]"),
#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_MS_PWMServoDriver.h"
#include <Adafruit_NeoPixel.h>
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
Adafruit_DCMotor *myMotor = AFMS.getMotor(1);
bool forward = true;
#define PIN 8
This file has been truncated, but you can view the full file.
Last login: Wed May 13 13:30:42 on ttys000
goldfish:~ jeff$ adb logcat
--------- beginning of system
I/libpersona( 4435): KNOX_SDCARD checking this for 10060
I/libpersona( 4435): KNOX_SDCARD not a persona
I/ActivityManager( 3497): Start proc com.samsung.android.email.widget for broadcast com.samsung.android.email.widget/.WidgetProvider: pid=4435 uid=10060 gids={50060, 9997} abi=arm64-v8a
D/PersonaManagerService( 3497): getPersonasForUser(): returning null!
D/ActivityManager( 3497): retrieveServiceLocked(): component = null; callingUser = 0; userId(target) = 0
D/ActivityManager( 3497): retrieveServiceLocked(): component = com.google.android.googlequicksearchbox/com.google.android.search.core.service.SearchService; callingUser = 0; userId(target) = 0
D/StatusBarManagerService( 3497): manageDisableList userId=0 what=0x0 pkg=WindowManager.LayoutParams
@jeffcrouse
jeffcrouse / poco_http_post_headers.cpp
Last active February 9, 2023 03:36
Poco HTTPPOST request with headers
#include <Poco/Net/HTTPClientSession.h>
#include <Poco/Net/HTTPRequest.h>
#include <Poco/Net/HTTPResponse.h>
#include <Poco/StreamCopier.h>
#include <Poco/Path.h>
#include <Poco/URI.h>
#include <Poco/Exception.h>
using namespace Poco::Net;
using namespace Poco;
@jeffcrouse
jeffcrouse / gist:5a3544cfe7ded718de10
Created June 14, 2014 20:58
ofxKinect crash stack trace 02
#0 0xf208405a in 0xf208405a ()
#1 0x0008c209 in ofxKinectContext::closeAll() at /Users/sysadmin/Desktop/dayton14/of_v0.8.1_osx_release/addons/ofxKinect/src/ofxKinect.cpp:922
#2 0x0008c0aa in ~ofxKinectContext at /Users/sysadmin/Desktop/dayton14/of_v0.8.1_osx_release/addons/ofxKinect/src/ofxKinect.cpp:784
#3 0x00086507 in ~ofxKinectContext at /Users/sysadmin/Desktop/dayton14/of_v0.8.1_osx_release/addons/ofxKinect/src/ofxKinect.cpp:783
#4 0x9796ff0b in __cxa_finalize ()
#5 0x97970236 in exit ()
#6 0x00598200 in ofAppGLFWWindow::exit_cb(GLFWwindow*) at /Users/sysadmin/Desktop/dayton14/of_v0.8.1_osx_release/libs/openFrameworks/app/ofAppGLFWWindow.cpp:242
#7 0x0035cb37 in _glfwInputWindowCloseRequest ()
#8 0x00360a53 in -[GLFWApplicationDelegate applicationShouldTerminate:] ()
#9 0x92015b72 in -[NSApplication _docController:shouldTerminate:] ()
@jeffcrouse
jeffcrouse / gist:812cb51043b9dded7b4c
Created June 14, 2014 20:48
ofxKinect crash stack trace 01
#0 0x98920952 in __pthread_kill ()
#1 0x9758d167 in pthread_kill ()
#2 0x9796f29c in abort ()
#3 0x994496c9 in abort_message ()
#4 0x9946a47d in default_terminate_handler() ()
#5 0x99467c30 in std::__terminate(void (*)()) ()
#6 0x9946764b in __cxa_throw ()
#7 0x000e0e89 in Poco::MutexImpl::lockImpl() ()
#8 0x00572d7a in Poco::FastMutex::lock() [inlined] at /Users/sysadmin/Desktop/dayton14/of_v0.8.1_osx_release/libs/openFrameworksCompiled/project/osx/../../../../libs/poco/include/Poco/Mutex.h:259
#9 0x00572d6f in ofThread::lock() at /Users/sysadmin/Desktop/dayton14/of_v0.8.1_osx_release/libs/openFrameworks/utils/ofThread.cpp:76
@jeffcrouse
jeffcrouse / camcrawler.js
Last active August 15, 2018 12:20
A quick node-crawler that looks for open surveillance cameras worldwide. Inspired by, and using URL patterns found at http://i.document.m05.de/surveillancesaver/
var Crawler = require("crawler").Crawler; // https://github.com/sylvinus/node-crawler
var S = require('string');
var fs = require('fs');
// A list of some patterns that will show up in webcam URLs
var patterns = ["jpg/image.jpg\?r="
, "mjpg/video.mjpg"
, "record/current.jpg"
, "cgi-bin/faststream.jpg"
, "oneshotimage.jpg"
@jeffcrouse
jeffcrouse / blocks.cpp
Created November 2, 2013 21:11
compile with g++ -o blocks blocks.cpp
#include <iostream>
using namespace std;
int main ()
{
int foo[4];
double bar[4];
// Print out the memory addresses of all 4 elements of "foo"
for(int i=0; i<4; i++)