Skip to content

Instantly share code, notes, and snippets.

View tdfacer's full-sized avatar

Trevor Facer tdfacer

View GitHub Profile
@tdfacer
tdfacer / names.py
Created February 10, 2022 04:22
names.py
names = ["anders", "trevor", "pizza", "batman", "rumpelstiltskin", "spaghetti"]
for i in names:
print(i)
if i == "rumpelstiltskin":
break
print("end")
@tdfacer
tdfacer / flash.sh
Created March 20, 2020 00:13
Flash Player Install
#sudo apt-add-repository "deb http://archive.canonical.com/ubuntu bionic partner"
#sudo apt-get update
#sudo apt-get install adobe-flashplugin
#sudo apt-get install adobe-flashplugin
echo 'sudo apt-add-repository "deb http://archive.canonical.com/ubuntu bionic partner"'
echo 'sudo apt-get update'
echo 'sudo apt-get install adobe-flashplugin'
echo 'sudo apt-get install adobe-flashplugin'
@tdfacer
tdfacer / terraform_cfn_example.md
Last active June 5, 2019 16:46
Terraform and Cloudformation integration

Terraform implementation

variable "cidr_block" {
  default = "10.0.0.0/16"
}

variable "vpc_output_name" {
  default = "VpcId"
}
#!/bin/bash -ex
INSTALL=$1
LAUNCH_WOLF=$2
LAUNCH_ERU=$3
WATCH=$4
FALLBACK=/Library/Frameworks/Mono.framework/Versions/Current/bin/msbuild
ERU_APK=com.ifit.eru.system-signed-zipped.apk
ERU_PACKAGE=com.ifit.eru
@tdfacer
tdfacer / InWorkoutStreamingVideoView.cs
Created April 12, 2018 05:20
Modifications to video view to update the debug overlay
// Add a couple fields:
IDisposable playerStateSub;
IfitTextView debugTextView;
// connect to the overlay control:
debugTextView = View.FindViewById<IfitTextView> (Resource.Id.video_debug_text);
// Use RX sub to update overlay:
playerStateSub = Observable.Interval (TimeSpan.FromSeconds (2)).Subscribe (UpdateVideoDebugOverlay);
@tdfacer
tdfacer / InWorkoutVideo.axml
Created April 12, 2018 05:13
Add to video layout to see overlay
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
...
...
...
<shire.android.controls.IfitTextView
android:id="@+id/video_debug_text"
android:layout_width="match_parent"
android:layout_height="100dp"
android:textSize="14dp"
android:textColor="#000000"
@tdfacer
tdfacer / VideoListener.cs
Created April 12, 2018 05:11
Modified VideoListener for debug text overlay
using System;
using System.Reactive.Subjects;
using Com.Google.Android.Exoplayer2;
using Com.Google.Android.Exoplayer2.Source;
using Com.Google.Android.Exoplayer2.Trackselection;
using Shire.Core.Log;
using Com.Google.Android.Exoplayer2.Decoder;
using Java.Util;
using System.Linq;
using Shire.Core.Video;
@tdfacer
tdfacer / teecat.sh
Created August 10, 2017 03:41
print properly formatted logcat logs to stdout as well as a file
#!/bin/bash
if [ $# -eq 1 ]; then
FILE=$1
else
FILE=logcatLogs.log
fi
adb logcat -v color -v time -v tag | tee $FILE
@tdfacer
tdfacer / adb_tcp.sh
Created August 10, 2017 03:37
Set-up tcp wifi adb for USB connected Android device
#!/bin/bash
IP_ADDR="$(adb shell ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d: -f2 | cut -d\ -f1)"
echo "calling adb tcpip with port 5555"
adb tcpip 5555
echo "connecting to IP: $IP_ADDR"
adb connect $IP_ADDR
@tdfacer
tdfacer / .vimrc
Created November 21, 2016 06:34
.vimrc Nov. 2016
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"
" Plugins vvv
Plugin 'VundleVim/Vundle.vim'
Plugin 'ctrlp.vim'