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
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
gsomoza / README.md
Last active May 13, 2019
Magento CLI Media Cleaner
View README.md

Magento CLI Media Cleaner

CLI utilities to clean the Magento media folders.

Features:

  • 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
mschuerig / docker-enter
Last active Feb 8, 2017
Enter a running docker container
View docker-enter
#! /bin/sh -e
# See
# http://blog.docker.com/2014/06/why-you-dont-need-to-run-sshd-in-docker/
# https://github.com/jpetazzo/nsenter
case "$1" in
-h|--help)
echo "Usage: docker-enter CONTAINER"
exit 0
@jbenet
jbenet / simple-git-branching-model.md
Last active Aug 20, 2019
a simple git branching model
View simple-git-branching-model.md

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
mmoulton / README.md
Last active Aug 15, 2018
Docker Container Stats Collection Using Collectd
View README.md

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.

Usage

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 collectd-docker.sh script. You may need to adjust the script to match your particulars, such as the mount location for cgroup.

@72lions
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
ryin / tmux_local_install.sh
Last active Aug 22, 2019
bash script for installing tmux without root access
View tmux_local_install.sh
#!/bin/bash
# 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
TMUX_VERSION=1.8
@njh
njh / _README.md
Last active Jan 15, 2018
Shell script to create a WebID certificate using OpenSSL
View _README.md
@Rud5G
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
<?php
// check: http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/db-repair-tool
/**
* Magento
*
* NOTICE OF LICENSE
*
* 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
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.