Skip to content

Instantly share code, notes, and snippets.

View dennisreimann's full-sized avatar
still hungry. still foolish.

d11n dennisreimann

still hungry. still foolish.
View GitHub Profile
@dennisreimann
dennisreimann / plopp.rb
Created July 23, 2012 14:04 — forked from halfbyte/ploppconvert.rb
ploppcast conversion
#!/usr/bin/env ruby
# dependencies:
# - ffmpeg (`brew install ffmpeg`)
puts "Usage: plopp DIR" and exit unless dir = ARGV[0]
Dir["#{dir}/*.mov"].each do |input|
output = File.basename(input, '.mov')
system "ffmpeg -i '#{input}' -map 0:0 -vn -acodec copy #{output}-1.m4a -map 0:1 -vn -acodec copy #{output}-2.m4a"
@dennisreimann
dennisreimann / .htaccess
Created September 6, 2012 14:30
Uberspace htaccess for Rails apps
RewriteEngine On
RewriteBase /
# ensure the browser supports gzip encoding
RewriteCond %{HTTP:Accept-Encoding} \b(x-)?gzip\b
RewriteCond %{REQUEST_FILENAME}.gz -s
RewriteRule ^(.+) $1.gz [L]
# ensure correct Content-Type and add encoding header
<FilesMatch \.css\.gz$>
@dennisreimann
dennisreimann / delete_contact_notes.scpt
Last active October 11, 2015 15:38
AppleScript snippet to delete contact notes in Address Book
tell application "Address Book"
activate
set thePeople to selection
repeat with thePerson in thePeople
set note of thePerson to ""
end repeat
save
end tell
@dennisreimann
dennisreimann / gist:5556707
Created May 10, 2013 19:16
Nothing to see, move along....
Test
@dennisreimann
dennisreimann / changelog
Created November 20, 2013 21:10
CHANGELOG generator
#!/usr/bin/env ruby
#
# CHANGELOG generator
#
# Usage:
#
# $ changelog [SINCE UNTIL]
#
# This script collects git commits from a given range (SINCE and UNTIL
# are optional refs, SINCE defaults to the last tag, UNTIL to HEAD).
@dennisreimann
dennisreimann / coffeelint.json
Created October 16, 2014 05:12
gulp setup for building node-webkit apps
{
"coffeescript_error": {
"level": "error"
},
"arrow_spacing": {
"name": "arrow_spacing",
"level": "ignore"
},
"no_tabs": {
"name": "no_tabs",
@dennisreimann
dennisreimann / galen-foreach-example.gspec
Created September 3, 2015 13:36
Galen forEach example with nested objects
@objects
form-row-* .form__row
label .form__row__label
input .form__row__input
= Form =
@on small
@forEach [form-row-*] as row
${row}.label:
@dennisreimann
dennisreimann / gulpfile.js
Created December 1, 2015 21:25
building elm projects with gulp: basic setup
var gulp = require('gulp');
var elm = require('gulp-elm');
var plumber = require('gulp-plumber');
var del = require('del');
// builds elm files and static resources (i.e. html and css) from src to dist folder
var paths = {
dest: 'dist',
elm: 'src/*.elm',
staticAssets: 'src/*.{html,css}'
@dennisreimann
dennisreimann / Main.elm
Last active April 2, 2024 20:17
A reaction to the article "A small dive into, and rejection of, Elm"
{-
This file is a reaction to the article "A small dive into, and rejection of, Elm":
https://hackernoon.com/a-small-dive-into-and-rejection-of-elm-8217fd5da235#.9w3ml4r6b
I think constructive criticism is very welcome in the Elm community. Pointing out
possibilities for documentation improvements, mentioning missing features or ways
in which the language could evolve etc. are imho a vital part of a good community.
However, the article above is neither well informed nor constructive. IMHO ranting
@dennisreimann
dennisreimann / identicon.ex
Last active December 10, 2016 21:25
Code for the chapter on creating an Identicon in "The Complete Elixir and Phoenix Bootcamp" on Udemy.
# Code for the chapter on creating an Identicon in
# "The Complete Elixir and Phoenix Bootcamp" on Udemy.
# see https://www.udemy.com/the-complete-elixir-and-phoenix-bootcamp-and-tutorial/
defmodule Identicon do
defmodule Identicon.Image do
defstruct hex: nil, color: nil, grid: nil, pixel_map: nil
end
alias Identicon.{Image}