Skip to content

Instantly share code, notes, and snippets.


Evan Tahler evantahler

Block or report user

Report or block evantahler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
evantahler / server.ts
Last active Feb 9, 2020
View server.ts
// There is no more actionhero CLI (start, startCluster, etc). You make your own 'main' file.
// This should make running in Docker, Serverless, etc easier.
// This also removes `boot.js`
import { Process, config, log } from '@actionhero/core' // we use NPM namespaces
// The core Actionhero package is really small... and you can opt-in to the parts you want
import WebServer from '@actionhero/web'
import WebSocketServer from '@actionhero/websocket'
import Cache from '@actionhero/cache'
import Resque from '@actionhero/resque'
evantahler / comcast.js
Last active Sep 21, 2019
Comcast Injected Javasctipt
View comcast.js
<script language="JavaScript" type="text/javascript">
// Copyright (C) 2017 Comcast Cable Communications, LLC
// Contact Us:
// Intended use of this message is to display critical and time sensitive notifications to customers.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
evantahler /
Last active Sep 3, 2019
Setting up a new computer via sshcode
# First, configure the host to run VSCode with SSHCODE -
# Then, run this command via the command line exposed from the new VSCode window (assuming as Root)
# Inspired by
# Run Command:
# wget && chmod 0766 && ./
evantahler / vpn-reconnect.scpt
Created Aug 9, 2019
Keep that VPN Connected (OSX)
View vpn-reconnect.scpt
on idle
tell application "System Events"
tell current location of network preferences
set VPNService to the service "vpn-evan" -- replace this with the name of your VPN connection
if VPNService is not null then
if current configuration of VPNService is not connected then
connect VPNService
View require-shim.js
// in your action
{formatter} = requrie('../helper.js')
// in helper.js
const path = require('path')
exports.formatter = require(path.join(__dirname, 'path', 'that', 'is', 'really', 'long', 'formatter.js'))
evantahler / test.js
Created Mar 28, 2018
Testing Node.JS browser apps with Selenium, Async/Await, and Jest
View test.js
* @jest-environment jest-environment-webdriver
const url = ''
describe('', () => {
test('it renders', async () => {
await browser.get(url)
const title = await browser.findElement(by.tagName('h2')).getText()
evantahler / build.js
Created Nov 20, 2017
Using NEXE to compile and ActionHero project
View build.js
const nexe = require('nexe')
output: 'build',
input: `${__dirname}/index.js`,
build: true,
silent: false
evantahler / client.js
Last active Nov 14, 2017
actionhero and next
View client.js
require('isomorphic-fetch') // ensure fech is in-scope, even on the server
let hosts = {
dev: 'http://localhost:8080',
production: ''
export default class Client {
apiEndpoint () {
if (process && process.title === 'node') {
evantahler / v17.js
Last active Oct 7, 2017
V17 to V18 cache ActionHero action
View v17.js
exports.cacheTest = {
name: 'cacheTest',
description: 'I will test the internal cache functions of the API',
inputs: {
key: {
required: true,
formatter: function (s) { return String(s) }
value: {
required: true,
evantahler / code.js
Created Sep 28, 2017
View code.js
const {promisify} = require('util')
async sleep (time) {
return promisify(setTimeout)(time)
You can’t perform that action at this time.