Skip to content

Instantly share code, notes, and snippets.

View JBreit's full-sized avatar

Jason Breitigan JBreit

  • Inner Mind Co.
  • Lancaster, PA
View GitHub Profile
/*global angular $*/
(function () {
'use strict';
angular.module('innermind.controllers', [])
.controller('IndexCtrl', [
'$scope',
'$state',
'$http',
angular.module('app.services', [])
.factory('TasksService', function ($q, $timeout, $http) {
var service = Object.create(null);
service.getTasks = function () {
var deferred = $q.defer();
$http.get('data/lists.json')
.then(console.log.bind(console), console.log.bind(console))
/*global angular*/
(function () {
'use strict';
var dataService = function ($http) {
var getData = function () {
return $http.get('http://127.0.0.1:8080/data/lists.json');
};
@JBreit
JBreit / Gruntfile.js
Created May 10, 2017 03:07 — forked from eliotfowler/Gruntfile.js
Sample Gruntfile
module.exports = function (grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);
// Define the configuration for all the tasks
grunt.initConfig({
module.exports = {
entry: "./src/main.js",
output: {
filename: "./dist/bundle.js"
},
module: {
loaders: [{
test: [/\.js$/, /\.es6$/],
exclude: /node_modules/,

TypeScript Node Starter

Dependency Status Build Status

Live Demo: TODO

Pre-reqs

const { spawn } = require('child_process')
const { existsSync, readdirSync, lstatSync, unlinkSync, rmdirSync } = require('fs')
const utils = {
/**
* Convert an options object into a valid arguments array for the child_process.spawn method
* from:
* var options = {
* foo: 'hello',
* baz: 'world'
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
namespace TestTrapCtrlC {
public class Program {
static bool exitSystem = false;
const { Console } = require('console');
const { createWriteStream } = require('fs');
const output = createWriteStream('./stdout.log');
const errorOutput = createWriteStream('./stderr.log');
const logger = new Console(output, errorOutput);
module.exports = logger;
#!/usr/bin/env node
const { log } = require('./logger');
switch (process.argv[2]) {
case 'start':
log('start command detected');
break;
case 'stop':
log('stop command detected');