Skip to content

Instantly share code, notes, and snippets.

View BenjaminVerble's full-sized avatar

Benjamin Verble BenjaminVerble

View GitHub Profile
@BenjaminVerble
BenjaminVerble / git-deployment.md
Created February 2, 2018 03:42 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

@BenjaminVerble
BenjaminVerble / README.md
Created February 23, 2017 20:15 — forked from track0x1/README.md
Conquering npm shrinkwrap (in layman's terms)

Conquering npm shrinkwrap (in layman's terms)

We've all been there. You start with a simple app idea and get to work. With the vast number of packages available on npmjs.org, your dependency list begins to grow exponentially. You then hear about a neat npm CLI command called shrinkwrap.

What is it?

[Shrinkwrap] locks down the versions of a package's dependencies so that you can control exactly which versions of each dependency will be used when your package is installed. – npmjs

Life without shrinkwrap

@BenjaminVerble
BenjaminVerble / better-nodejs-require-paths.md
Created September 9, 2016 17:27 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@BenjaminVerble
BenjaminVerble / README.md
Created December 29, 2015 00:50 — forked from HenrikJoreteg/README.md
Minimalist routing in Redux

Why would you want to do this? Because you often don't need more. It's nice to not have to think about your "router" as this big special thing.

Instead, with this approch, your app's current pathname is just another piece of state, just like anything else.

This also means that when doing server-side rendering of a redux app, you can just do:

var app = require('your/redux/app')
var React = require('react')
// browserify
var browserify = require('browserify');
var es6ify = require('es6ify');
// gulp stuff
var gulp = require('gulp');
var livereload = require('gulp-livereload');
var source = require('vinyl-source-stream');
var jshint = require('gulp-jshint');
var livereload = require('gulp-livereload');
var watch = require('gulp-watch');
// Load Ember into the global scope by requiring it
require('ember');
// Go have fun
var app = Ember.Application.create();