Skip to content

Instantly share code, notes, and snippets.

View mikehostetler's full-sized avatar

Mike Hostetler mikehostetler

View GitHub Profile
@mikehostetler
mikehostetler / action-deploy-prod.yml
Created November 8, 2022 14:52
Elixir + Rust + ESBuild + SASS + Tailwind deploy setup to Fly.io
name: "Deploy Server Prod"
on:
workflow_dispatch:
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
deploy:
name: Deploy Server to Production

Keybase proof

I hereby claim:

  • I am mikehostetler on github.
  • I am mikehostetler (https://keybase.io/mikehostetler) on keybase.
  • I have a public key ASB8P3GfcmANjraRodO5Ho_2Oq5-wXzaF5TECMWtZ4XY-go

To claim this, I am signing this object:

@mikehostetler
mikehostetler / clone-trails.sh
Created December 3, 2015 14:30
Quick script to clone down and develop on Trails.js
#!/bin/bash
# Quick script to clone all necessary Trails repositories for local development
# Prereq
# * Access to all repo's
for repo in trails \
eslint-config-trails \
trails-example-app \
trailpack-core \
@mikehostetler
mikehostetler / keybase.md
Created November 30, 2015 02:14
Verifying Keybase.io

Keybase proof

I hereby claim:

  • I am mikehostetler on github.
  • I am mikehostetler (https://keybase.io/mikehostetler) on keybase.
  • I have a public key whose fingerprint is 5C4A E821 A731 DEAD 9DA0 F0CD C032 BAB3 EEF7 9557

To claim this, I am signing this object:

@mikehostetler
mikehostetler / bootstrap.js
Created June 20, 2014 13:32
Sails powered script
var extend = require('util')._extend;
var async = require('async');
var Waterline = require('../node_modules/sails/node_modules/waterline');
var couchdb = require('sails-couchdb-orm');
var config = require('../config/adapters').adapters.couchdb;
couchdb.config = extend(couchdb.defaults, config);
module.exports = bootstrap;
@mikehostetler
mikehostetler / AuthController.js
Created May 27, 2014 13:35
Res.json example
callback: function (req, res) {
passport.callback(req, res, function (err, user) {
//sails.log.debug("API -> Controllers->AuthControllers->Callback: Found our user, now lets log them in",user);
req.login(user, function (err) {
// If an error was thrown, redirect the user to the login which should
// take care of rendering the error messages.
if (err) {
var redirect = req.param('action') === 'register' ? '/#user/register' : '/#user/login';
if(req.wantsJSON === true) {
res.json(err.status_code || 403,{
@mikehostetler
mikehostetler / gist:7083772
Created October 21, 2013 13:20
Strider Jelly shim for Jasmine tests: url: http://localhost:9090/spec/runner.html port: 8080 enable staic server, serve: . shim: (see below)
<script type="text/javascript">
/*
* This allows you to receive reporting from a series
* of Jasmine tests in the form of a Jasmine Custom
* Reporter that talks back to the strider server.
*/
(function(){
// Tiny Ajax Post
var post = function (url, json, cb){
var req;
body, .slide-master-content-alt {
font-family: "Gill Sans Light", "Gill Sans MT", Tahoma, Geneva, sans-serif;
background-color: rgb(15, 126, 205);
background-image: url(http://www.browserswarm.com/ext/browserswarm-plugin/honeycomb-bg.jpg);
}
h1 {
background: none;
color: rgb(18,102,192);
text-shadow: -1px -1px 2px #333;
font-family: "nevisBold", arial, sans-serif;
Failed to load resource: the server responded with a status of 404 (Not Found) http://www.browserswarm.com/javascripts/config/jelly_config.js
Error: Argument 'Jelly_configCtrl' is not a function, got undefined
at assertArg (http://www.browserswarm.com/javascripts/lib/angular.js:1063:11)
at assertArgFn (http://www.browserswarm.com/javascripts/lib/angular.js:1073:3)
at http://www.browserswarm.com/javascripts/lib/angular.js:5365:9
at http://www.browserswarm.com/javascripts/lib/angular.js:4937:17
at forEach (http://www.browserswarm.com/javascripts/lib/angular.js:155:20)
at nodeLinkFn (http://www.browserswarm.com/javascripts/lib/angular.js:4922:11)
at compositeLinkFn (http://www.browserswarm.com/javascripts/lib/angular.js:4550:15)
at compositeLinkFn (http://www.browserswarm.com/javascripts/lib/angular.js:4553:13)
// Run all the things...
run: function( done ) {
// Ensure build path exists
anvil.fs.ensurePath( this.config.buildPath , function ( err ) {
if( err ) {
anvil.log.error( err );
done();
}
});