Skip to content

Instantly share code, notes, and snippets.

View tgreiser's full-sized avatar

Tim Greiser tgreiser

View GitHub Profile
* This sample lets you record and share video with Appcelerator Titanium on Android.
* Tested on 3.2.1 of TITANIUM MOBILE SDK, should work on 3.x. I don't know about previous versions.
* Based on
* which does not fire the activity callback on 3.x
* First, create our UI. We'll have two buttons: record, and share.
tgreiser / simple.go
Created September 21, 2016 19:21
Functional Dependency Injection example
package main
import "log"
// Our container
type Application struct {
DB Database
// Interface for a system component
tgreiser / notes.txt
Created October 23, 2016 16:19
Ether Dream in python
The canonical example is here:
a number of projects have been based off Lots of them use pygame.
Most of the code only seems to run on python 2.7.
On windows, python 2.7 drops frames due to some buggy network packets.
tgreiser / paragraph_vector_example.scala
Created November 15, 2017 01:35
Ported from:
NOTE - you must download the paravec resources data to /opt/data/paravec on your SKIL server.
import scala.collection.JavaConversions._
import org.datavec.api.util.ClassPathResource;
import org.nd4j.linalg.primitives.Pair;
tgreiser / ledPixelController_460.ino
Created February 19, 2018 03:32
Teensy LED controller using serial communication
// Lucas Morgan - //
#define USE_OCTOWS2811
// ------------ Change these as neccesary -----------//
#define NUM_LEDS_PER_STRIP 460
#define NUM_STRIPS 8
tgreiser / gist:f6b6d058e06db2f7d9d1982bbdf0a8af
Created November 30, 2018 17:03
Laser Games for Ether Dream
Laser Hexagon
Laser Asteroids
Laser Pong
tgreiser /
Last active January 30, 2022 21:59
Use pytezos to check the price of FA2 tokens at quipuswap
from pytezos import pytezos
pytezos = pytezos.using(shell='mainnet')
# Enter the tokens you are interested in from
tokens = dict(
hDAO = ('KT1QxLqukyfohPV5kPkw97Rs6cw1DDDvYgbB', 6),
WRAP = ('KT1FG63hhFtMEEEtmBSX2vuFmP87t9E7Ab4t', 8),
bDAO = ('KT1DssMzoSr8fnUUq1WxeSuHfLG4gzS7pgge', 6),
STKR = ('KT1BMEEPX7MWzwwadW3NCSZe9XGmFJ7rs7Dr', 18),
tgreiser /
Created December 10, 2022 01:37
Make a seamless looping video from a normal video (colab)
# assume you have out.mp4 that is a normal video
!ffmpeg -y -r 30 -i out.mp4 -vf reverse reversed.mp4
!ffmpeg -y -i out.mp4 -i reversed.mp4 -filter_complex "concat=n=2:v=1:a=0" output.mp4
print('\nSeamless loop (original saved to out.mp4):')