Skip to content

Instantly share code, notes, and snippets.

Hagen Hiller hG3n

Block or report user

Report or block hG3n

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
View .vimrc-plain
"""""""""""""""""""""""""""
"--- GENERAL SETTINGS ---"
"""""""""""""""""""""""""""
scriptencoding utf-8
set enc=utf-8
set fileencoding=utf-8
set fileencodings=ucs-bom,utf8,prc
set backspace=indent,eol,start "in case bcksp isnt working well"
set tabstop=2
@hG3n
hG3n / brew-multiuser-osx.md
Created Jun 20, 2019
How to make brew available to multiple users on one mac
View brew-multiuser-osx.md

OSX Homebrew Setup for Multiple Users

  1. Users & Groups --> add group 'brew' w/ users
  2. exec: sudo chgrp -R brew $(brew --prefix)/*
  3. exec: sudo chmod -R g+w $(brew --prefix)/*
@hG3n
hG3n / lirc-pi3.txt
Created Dec 5, 2018 — forked from prasanthj/lirc-pi3.txt
Getting lirc to work with Raspberry Pi 3 (Raspbian Stretch)
View lirc-pi3.txt
Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]).
The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch.
Following are the changes that I made to make it work.
$ sudo apt-get update
$ sudo apt-get install lirc
# Add the following lines to /etc/modules file
lirc_dev
lirc_rpi gpio_in_pin=18 gpio_out_pin=17
@hG3n
hG3n / groupBy
Created Nov 22, 2018
Group Elements by several matching attributes
View groupBy
function groupBy(array: any[], f): any {
const groups = {};
array.forEach(function (o) {
const group = JSON.stringify(f(o));
groups[group] = groups[group] || [];
groups[group].push(o);
});
return Object.keys(groups).map(function (group) {
return groups[group];
});
@hG3n
hG3n / fix-my-fucking-audio.sh
Created Sep 16, 2018
Fix PulseEffects on Ubuntu 18.04
View fix-my-fucking-audio.sh
dconf reset -f /com/github/wwmm/pulseeffects/
pactl unload-module module-device-manager
View .vimrc_qt
"""""""""""""""""""""""""""
"--- GENERAL SETTINGS ---"
"""""""""""""""""""""""""""
scriptencoding utf-8
set enc=utf-8
set fileencoding=utf-8
set fileencodings=ucs-bom,utf8,prc
set tabstop=4
set shiftwidth=4
View .zshrc
# ---------------------------- #
# --- GENERAL ZSH SETTINGS --- #
# ---------------------------- #
ZSH=$HOME/.zsh # Path to zsh_cfg.sh
ZSH_THEME="agnoster" # chosen theme
source $ZSH/zsh_cfg.sh # laod zsh config file
# path settings
View .ideavimrc
"""""""""""""""""""""""""""
"--- GENERAL SETTINGS ---"
"""""""""""""""""""""""""""
scriptencoding utf-8
set enc=utf-8
set fileencoding=utf-8
set fileencodings=ucs-bom,utf8,prc
set tabstop=4
set shiftwidth=4
@hG3n
hG3n / include-html.directive.ts
Last active Feb 27, 2018
directive to include an external html file into an existing dom-element
View include-html.directive.ts
import {Directive, ElementRef, Input, OnChanges, OnInit} from '@angular/core';
import 'rxjs/add/operator/map';
import {HttpClient, HttpErrorResponse} from "@angular/common/http";
@Directive({
selector: '[includeHtml]'
})
export class IncludeHtmlDirective implements OnInit, OnChanges {
View segment_texture_atlas.py
# load image atlas as greyscale
print("loading image: %s" % self.file)
atlas = io.imread(self.file, as_grey=True)
# check atlas size
rows = atlas.shape[0]
cols = atlas.shape[1]
if rows % self.slice_size != 0 or cols % self.slice_size != 0:
print("ERROR: wrong image dimensions, should be multiple of 200")
return
You can’t perform that action at this time.