Skip to content

Instantly share code, notes, and snippets.

View anaptfox's full-sized avatar

Taron Foxworth anaptfox

View GitHub Profile

Keybase proof

I hereby claim:

  • I am anaptfox on github.
  • I am anaptfox (https://keybase.io/anaptfox) on keybase.
  • I have a public key whose fingerprint is 76C3 579C 7254 BD00 35A2 E45A 5E61 1EC3 E121 AB0F

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am anaptfox on github.
  • I am anaptfox (https://keybase.io/anaptfox) on keybase.
  • I have a public key whose fingerprint is 2BD7 410F ACD6 37B2 5154 5E03 CB41 89FA 70C9 FF26

To claim this, I am signing this object:

@anaptfox
anaptfox / losant-mqtt-browser.js
Created December 16, 2016 16:42
Losant support for browser
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
var Device = require('losant-mqtt').Device;
// Construct device.
var device = new Device({
id: 'device-id',
@anaptfox
anaptfox / amazon-polly-file.js
Created December 13, 2016 13:54
Node.js Amazon Polly to file example.
// Load the SDK
const AWS = require('aws-sdk')
const Fs = require('fs')
// Create an Polly client
const Polly = new AWS.Polly({
signatureVersion: 'v4',
region: 'us-east-1'
})
@anaptfox
anaptfox / amazon-polly-speaker.js
Last active May 24, 2020 00:14
Node.js Amazon Polly to speaker example.
// Load the SDK
const AWS = require('aws-sdk')
const Stream = require('stream')
const Speaker = require('speaker')
// Create an Polly client
const Polly = new AWS.Polly({
signatureVersion: 'v4',
region: 'us-east-1'
})
//Create a Pushover object with the user, token , and priority
var p = new push( {
user: user,
token: TOKEN,
priority: priority
});
//Create our message and title
var msg = {
title: project.name + messageAction,
//Modulus will include an object in the POST request
//https://modulus.io/codex/projects/notifications/webhooks
//Grab the type of action
var type = req.body.type;
//Grab the project details
var project = req.body.project;
var messageAction;
// Pushover has priorty settings. Learn more here: https://pushover.net/api#priority
@anaptfox
anaptfox / pushover.js
Created January 1, 2014 00:30
Gist for blog post on blog.modulus.io
var push = require( 'pushover-notifications' );
var moment = require('moment');
//Api token from push over
var TOKEN = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
module.exports = {
@anaptfox
anaptfox / .zshrc
Created June 18, 2013 16:03
My .zshrc file
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Example aliases