Skip to content

Instantly share code, notes, and snippets.

View iDVB's full-sized avatar
💭
Work'n

Dan Van Brunt iDVB

💭
Work'n
View GitHub Profile
@iDVB
iDVB / app_view.js
Created February 11, 2014 04:03
Rendr + Socket.io app_view.js
var BaseAppView = require('rendr/client/app_view')
, $ = require('jquery')
, io = require('socket.io')
;
module.exports = BaseAppView.extend({
postInitialize: function() {
var socket = io.connect('http://localhost');
socket.on('news', function (data) {
@iDVB
iDVB / index.js
Created February 11, 2014 04:12
Rendr + Socket.io base Express file
var express = require('express')
, http = require('http')
, rendr = require('rendr')
, config = require('config')
, lampAPI = require('./api/index')
, io = require('socket.io')
, ioServer
, webSocket
, connectedUsers = {}
, app = express();
var Scheduler = React.createClass({
getInitialState: function() {
//var timers = localStorage.getItem('genomeTimers') === null ? [] : JSON.parse(localStorage.getItem('genomeTimers'));
return {
recentProjects: [],
timers: []
};
},
componentDidMount: function() {
@iDVB
iDVB / gist:957c4e98cfd0a2023c95
Last active August 29, 2015 14:23
Vagrant Puppet Error
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'win2008r2x64'...
Progress: 10%
Progress: 90%
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: win2008r2x64-vagrant_default_1434678115209_76130
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
$puppetVersion = '3.8.1'
$MsiUrl = "https://downloads.puppetlabs.com/windows/puppet-$puppetVersion.msi"
$MsiUrlx64 = "https://downloads.puppetlabs.com/windows/puppet-$puppetVersion-x64.msi"
$PuppetInstallerPath = 'c:\vagrantshared\resources\installers'
$PuppetInstallerFile = 'puppet-agent.msi'
if ([System.IntPtr]::Size -eq 8) {
Write-Host "Going Puppet 64-bit."
$MsiUrl = $MsiUrlx64
$PuppetInstallerFile = 'puppet-agent-x64.msi'
}
@iDVB
iDVB / webpack.config.build.js
Created November 11, 2015 17:03
webpack -p breaking app
var host = 'localhost';
var port = parseInt(process.env.PORT) + 1 || 3001;
var path = require('path');
var bourbon = require('node-bourbon').includePaths;
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var Clean = require('clean-webpack-plugin');
var gitInfo = require('git-repo-info')();
INFO global: Vagrant version: 1.9.1
INFO global: Ruby version: 2.2.5
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_OLD_ENV_RBENV_SHELL="bash"
INFO global: VAGRANT_OLD_ENV_LOGNAME="dvanbrunt"
INFO global: VAGRANT_OLD_ENV__="/usr/local/bin/vagrant"
INFO global: VAGRANT_OLD_ENV_SHELL="/bin/bash"
INFO global: VAGRANT_OLD_ENV_TERM_SESSION_ID="w0t0p0:7C87EB83-D791-4B13-8D9A-890A7FDD0F96"
INFO global: VAGRANT_OLD_ENV_SHLVL="1"
INFO global: VAGRANT_OLD_ENV_NVM_IOJS_ORG_MIRROR="https://iojs.org/dist"
build
database.sqlite
node_modules
ncp-debug.log
npm-debug.log
@iDVB
iDVB / Dockerfile
Last active January 13, 2017 19:30
ReactJS App Compose files
FROM node:7.2.1-alpine
# Copy application files
COPY ./build /usr/src/app
WORKDIR /usr/src/app
# Install Node.js dependencies
RUN npm install --production --silent
CMD [ "node", "server.js" ]
@iDVB
iDVB / Dockerfile
Last active January 16, 2017 14:42
Codefresh Pipe
FROM node:7.2.1-alpine
# Copy application files
COPY ./build /usr/src/app
WORKDIR /usr/src/app
# Install Node.js dependencies
RUN npm install --production --silent
RUN ls -lR .
RUN cat ./assets.js