Skip to content

Instantly share code, notes, and snippets.

View huyderman's full-sized avatar

Jo-Herman Haugholt huyderman

View GitHub Profile
@huyderman
huyderman / gods.md
Created November 10, 2017 18:06
Divinity and Cults summary

Roman Gods

Name Alignment Description Weapons Armor Special Req. Page
Jupiter Lawful God of the Sky, Lightning, Rulership, & Justice Javelin, lance, longsword, scepter (mace) Any 35 (vol. 1)
@huyderman
huyderman / molotov.ls
Created July 24, 2017 11:13
Riot mixin for adding a BottleJS container to a tag
require! bottlejs: { pop }
# Riot mixin for adding a BottleJS container to a tag
#
# @param [String|Bottle] @bottle A Bottle or the name of the bottle to pop
# @return [Object]
export Molotov = ->
@bottle = if typeof! it is \Bottle
then it
else pop it
var form_data = new FormData();
form_data.append('arr[]', 23);
form_data.append('arr[]', 42);
aja().method('post').body(form_data).go();
@huyderman
huyderman / README.md
Last active February 8, 2016 11:51
Ratio Tagger

Aspect Ratio Tagger

Usage

(function(){
  var aspect_ratios = {
    0.75: 'portrait',
    1: 'square',
 1.3333: 'landscape',
# Class representing an Attribute Value Pair as used in SuperOffice
class AttributeValuePair
attr_reader :key
attr_reader :value
attr_reader :error
# @overload initialize(key:, value:, error: nil)
# Sets the key, value and optional error
# @param key [Object]
# @param value [Object]
@huyderman
huyderman / answer_machine_convert.sh
Created June 19, 2015 13:53
Answer Machine Audio Converter
#!/usr/bin/env sh
# Convert a file to mono 8kHz with PCM µ-law encoding
if [ -n "$1" ]; then
ffmpeg -i $1 -codec pcm_mulaw -ar 8000 -ac 1 ${2:-"${1%.*}.wav"}
else
echo "Usage:"
echo "answer_machine_convert.sh input_file.wma [output_file.wav]"
fi
@huyderman
huyderman / git_tips.md
Last active August 29, 2015 14:23
Git tips and tricks!

Git tips and tricks!

Warning! Some of these tips relate to rebasing. Remember you should never rebase master or any other branches used by other people (e.g. develop). If you think you need to rebase master, you are probably wrong and there are other ways you can achieve what you want. If you rebase master or another branch used by other people and mess up, your tech-lead will smack you with the git handbook.

Auto-Squash

If you make a commit with the commit-message squash! ... or fixup! ..., where ... is the beginning of a previous commit message, you can use the --autosquash option when doing an interactive rebase to automatically mark those commits for squashing. You can even auto-generate these commit messages if you use --squash or --fixup when committing!

@huyderman
huyderman / fork.rb
Created April 21, 2015 10:45
Fork with logger
require 'logger'
logger = Logger.new STDOUT
function = -> { logger.info "Something that takes a while..." }
# fork is not portable
if Process.respond_to?(:fork)
Process.detach fork(&function)
else
# Maintainer: Jo-Herman Haugholt <johannes@huyderman.com>
pkgname=gitver-git
pkgver=0.0.0
pkgrel=1
pkgdesc="Simple version string management for git"
arch=('any')
url="https://github.com/manuelbua/gitver"
license=('Apache')
groups=()