Skip to content

Instantly share code, notes, and snippets.

Niclas Hoyer niclashoyer

  • Kiel, Germany
Block or report user

Report or block niclashoyer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
judy2k / parse_dotenv.bash
Created Mar 22, 2017
Parse a .env (dotenv) file directly using BASH
View parse_dotenv.bash
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
gsomoza /
Last active May 13, 2019
Magento CLI Media Cleaner

Magento CLI Media Cleaner

CLI utilities to clean the Magento media folders.


  • Clean unused images from the product catalog.
  • Clean the product catalog image cache.
  • Ready to use: automatically reads settings from app/etc/local.xml
  • FAST: I used it to safely clean about 45,000 images in just a couple of minutes.
mschuerig / docker-enter
Last active Feb 8, 2017
Enter a running docker container
View docker-enter
#! /bin/sh -e
# See
case "$1" in
echo "Usage: docker-enter CONTAINER"
exit 0
jbenet /
Last active Nov 8, 2019
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

mmoulton /
Last active Aug 15, 2018
Docker Container Stats Collection Using Collectd

Docker stats collection for collectd

This script can be used to feed collectd with cpu and memory usage statistics for running docker containers using the collectd exec plugin.

This script will report the used and cached memory as well as the user and system cpu usage by inspecting the appropriate cgroup stat file for each running container.


This script is intented to be executed by collectd on a host with running docker containers. To use, simply configure the exec plugin in collectd to execute the script. You may need to adjust the script to match your particulars, such as the mount location for cgroup.

72lions / concat.array.buffers.js
Created Jan 14, 2013
Concatenates two ArrayBuffers
View concat.array.buffers.js
* Creates a new Uint8Array based on two different ArrayBuffers
* @private
* @param {ArrayBuffers} buffer1 The first buffer.
* @param {ArrayBuffers} buffer2 The second buffer.
* @return {ArrayBuffers} The new ArrayBuffer created out of the two.
var _appendBuffer = function(buffer1, buffer2) {
var tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength);
ryin /
Last active Nov 21, 2019
bash script for installing tmux without root access
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
njh /
Last active Oct 5, 2019
Shell script to create a WebID certificate using OpenSSL
Rud5G / magento-db-repair-tool-1.0.php
Created Mar 20, 2012
Magento Database Repair Tool 1.0
View magento-db-repair-tool-1.0.php
// check:
* Magento
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
doitian / knife.rb
Created Dec 20, 2011
Configuration files for chef-solo and knife, so they all use directories inside the chef repo, instead of default global pathes such as /etc, /var
View knife.rb
log_level :info
log_location STDOUT
node_name 'solo'
client_key File.expand_path('../solo.pem', __FILE__)
cache_type 'BasicFile'
cache_options( :path => File.expand_path('../checksums', __FILE__))
cookbook_path [ File.expand_path('../../cookbooks', __FILE__) ]
You can’t perform that action at this time.