Skip to content

Instantly share code, notes, and snippets.

View troykelly's full-sized avatar
💭
I may be slow to respond.

Troy Kelly troykelly

💭
I may be slow to respond.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am troykelly on github.
  • I am troykelly (https://keybase.io/troykelly) on keybase.
  • I have a public key whose fingerprint is EFBB 2BC6 8952 05C0 AF7E C7FE 0688 7FB0 09D3 85AD

To claim this, I am signing this object:

@troykelly
troykelly / .bash_profile
Created November 26, 2016 23:07 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@troykelly
troykelly / ghost_index.js
Last active May 5, 2019 18:27
Adding HSTS to Ghost Blog
// # Ghost Startup
// Orchestrates the startup of Ghost when run from command line.
var ghost = require('./core'),
express = require('express'),
errors = require('./core/server/errors'),
parentApp = express(),
hsts = require('hsts'),
express_enforces_ssl = require('express-enforces-ssl');
@troykelly
troykelly / freepbx-asterisk14-install-g729-g723-codec.sh
Created March 26, 2017 19:14
Install free G729 and G723 codec on FreePBX running Asterisk 14
#!/usr/bin/env bash
# This is for x64 Intel CPU with SSSE4 instructions
# To check your CPU type, run: cat /proc/cpuinfo and look for "sse4_1" in the "flags" line then this script works
# To check x32 vs x64, run: getconf LONG_BIT
# If your CPU isnt an x64 or have sse4 support, then get your .so file version at: http://asterisk.hosting.lv/
# Tested on Centos x64 - on a FreePBX Distro 13 x64
echo -------
echo This installs the open source version of the g729 and g723.1 codecs
echo You may need to buy licenses to use these codecs - it is your responsibility.
echo -------
diff -ruN ../bazel.orig/scripts/bootstrap/compile.sh ./scripts/bootstrap/compile.sh
--- ../bazel.orig/scripts/bootstrap/compile.sh 2018-05-14 01:37:24.514906477 +0000
+++ ./scripts/bootstrap/compile.sh 2018-05-14 01:38:42.115848112 +0000
@@ -116,7 +116,7 @@
run "${JAVAC}" -classpath "${classpath}" -sourcepath "${sourcepath}" \
-d "${output}/classes" -source "$JAVA_VERSION" -target "$JAVA_VERSION" \
- -encoding UTF-8 "@${paramfile}"
+ -encoding UTF-8 "@${paramfile}" -J-Xmx500M
diff -ruN ../tensorflow.orig/.bazelrc ./.bazelrc
--- ../tensorflow.orig/.bazelrc 1970-01-01 00:00:00.000000000 +0000
+++ ./.bazelrc 2018-05-14 22:31:14.763274885 +0000
@@ -0,0 +1 @@
+import /home/pi/tf/tensorflow/.tf_configure.bazelrc
diff -ruN ../tensorflow.orig/tensorflow/workspace.bzl ./tensorflow/workspace.bzl
--- ../tensorflow.orig/tensorflow/workspace.bzl 2018-05-14 22:29:04.663567324 +0000
+++ ./tensorflow/workspace.bzl 2018-05-14 22:31:06.903292600 +0000
@@ -104,16 +104,15 @@
build_file = clean_dep("//third_party:com_google_absl.BUILD"),
#!/usr/bin/env bash
# Builds tensorflow on a Pi 3 b+
#
# Start with a fresh image, put a USB stick in the side (all data will be lost)
# This is not fault tolerant, and barely tested
#
# With guidance from
# https://medium.com/ml-everything/offline-object-detection-and-tracking-on-a-raspberry-pi-fddb3bde130
#
# Run with:
@troykelly
troykelly / mediaTypes.sql
Created May 20, 2018 19:59
Fairly complete list of media types (mime types) ready to use in a mysql mariadb sql database
CREATE TABLE `mediaType` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`template` varchar(255) COLLATE utf8mb4_bin NOT NULL,
`reference` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
`extension` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `idx_mediaType_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
@troykelly
troykelly / pi_anglecam.sh
Last active May 24, 2018 03:28
Pi Angelcam Builder
#!/usr/bin/env bash
#
# With guidance from
# https://github.com/angelcam/arrow-client/wiki/Turning-your-ARM-device-into-AngelBox
#
# Run with:
# source <(curl -s https://gist.githubusercontent.com/troykelly/a273bfbe7348044ebc8df9ecd913c3fc/raw/pi_anglecam.sh)
#
sudo raspi-config --expand-rootfs && \
sudo partprobe && \
@troykelly
troykelly / chr-build.sh
Last active October 27, 2019 06:38
Get and install CHR
#!/usr/bin/env bash
wget -S https://download2.mikrotik.com/routeros/6.45.6/chr-6.45.6.img.zip
unzip chr-6.45.6.img.zip
dd if=chr-6.45.6.img of=/dev/vda