Skip to content

Instantly share code, notes, and snippets.

View kingcody's full-sized avatar

Cody Mize kingcody

  • Digitally Seamless
View GitHub Profile
@kingcody
kingcody / admin.controller.es6
Last active October 27, 2016 14:52
Angular Fullstack - delete confirmation modal example
'use strict';
(function() {
class AdminController {
constructor(User, Modal) {
// Use the User $resource to fetch all users
this.users = User.query();
// Our callback function is called if/when the delete modal is confirmed
@kingcody
kingcody / teensyduino.sh
Created December 11, 2018 07:34
Update teensyduino.sh PID Detection
#!/bin/bash
sleep 2
export HOME=$2
$1 & TEENSYPID=$!
sleep 5
xdotool search --class "teensyduino" \
windowfocus \
@kingcody
kingcody / socket.service.js
Last active July 8, 2022 04:06
socket.io service for angular-fullstack
/* global io */
'use strict';
angular.module('testFullstackApp')
.factory('socket', function(socketFactory) {
// socket.io now auto-configures its connection when we ommit a connection url
var ioSocket = io('', {
// Send auth token on connection, you will need to DI the Auth service above
// 'query': 'token=' + Auth.getToken()