Skip to content

Instantly share code, notes, and snippets.

View perguth's full-sized avatar

Per Guth perguth

View GitHub Profile
@perguth
perguth / gulpfile.js
Last active August 29, 2015 14:22
Simple `Gulp` chain that transforms `ES6` to `ES5` using `Browserify` and `Babelify`.@bootstrap @toolchain @env ```sh npm install --verbose --save-dev gulp gulp-util gulp-babel gulp-mocha gulp-concat ```
var gulp = require('gulp')
var log = require('gulp-util').log
var lib = require('./gulpfile.lib.js')
var src = 'index.js'
var tst = 'test.js'
var buildID = 1
var newBuildLog = function () {
log("Build # " + lib.couldBeGutilLog (buildID++, 1)
@perguth
perguth / Contract terms for OSS contributions
Last active August 29, 2015 14:22
Contract terms for OSS contributions from http://spiceprogram.org/contracts/ @legal
Where the Parties have agreed that open source components can be used in the project, all fixes and functional enhancements to any such open source components created as part of the project work can be published by Futurice and its the developers under the respective open source component’s license. In addition to code, the work to be published may include documentation, tests, graphics or other deliverables required to make an acceptable open source contribution. When publishing material Futurice and its developers will ensure that no functionality or information that is considered customer’s trade secret will be published.
By publishing the fixes and enhancements Futurice will ensure that these changes may become a part of any future releases of the component. This will make upgrades easier and reduce the cost of maintaining the solution. The effort required to publish the change is considered normal project work and prioritized like any other tasks in the project.
@perguth
perguth / Fragenkatalog Umzug auf Linux .md
Last active August 29, 2015 14:22
Fragenkatalog: Umzug auf Linux

Fragenkatalog: Umzug auf Linux

  • Spezielles Linux gewünscht?

    Ansonsten lautet unsere Empfehlung Ubuntu MATE. Es zeichnet sich durch Geschwindkeit und Übersichtlichkeit aus.

    +-------------------------------------+
    |                                     |
    +-------------------------------------+
  • Gewünschte Software
@perguth
perguth / 150630 tablets .md
Last active August 29, 2015 14:23
3 tabs in comparison
#!/bin/sh
# only done once:
#
# for I in `seq 1 8` ; do
# dd if=/dev/zero of=1GB_$I bs=1M count=1024
# done
# dd if=/dev/zero of=5GB bs=1M count=5120
sync
@perguth
perguth / package.json
Last active August 29, 2015 14:27
scripts part of the `package.json` of a test project
"dependencies": {
"hyperboot": "^2.1.1"
},
"devDependencies": {
"browser-sync": "^2.8.2",
"browserify": "^11.0.1",
"catw": "^1.0.1",
"hyperboot": "^2.1.1",
"tap": "^1.3.2",
"uglifyjs": "^2.4.10",
@perguth
perguth / purge_from_git_branch.sh
Last active September 3, 2015 10:15
Remove a certain file completely throughout all history from a GIT repository branch.
# replace FILE (eg. `subfolder/file.md`) and BRANCH
git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch FILE' \
--prune-empty --tag-name-filter BRANCH
@perguth
perguth / log.js
Created September 8, 2015 10:48
A simple `console.log` wrapper. Just a shorthand.
function log () {
var args = Array.prototype.slice.call(arguments)
console.log.apply(console, args) }
@perguth
perguth / iterate_array.sh
Last active September 8, 2015 15:00
Iterate over an array in Bash.
ARRAY=(
hello
world
)
i=0
while [ $i -lt ${#ARRAY[@]} ]; do
echo ${ARRAY[i]}
((i++))
done