Skip to content

Instantly share code, notes, and snippets.

View apfohl's full-sized avatar

Andreas Pfohl apfohl

View GitHub Profile
@irae
irae / .gitconfig
Last active February 14, 2020 09:52
Git Vommit -- making typos fun and refreshing
[alias]
vommit = !sh -c \"cat ~/.gitvommit\"
@denvazh
denvazh / gitlab
Last active September 6, 2019 03:43
Freebsd port of script to manage gitlab as system service.
#!/bin/sh
#
# Written by Denis Vazhenin <[email protected]>
#
# This script was ported from Debian/Ubuntu version of start script for Gitlab:
# https://raw.github.com/gitlabhq/gitlabhq/master/lib/support/init.d/gitlab
#
# PROVIDE: gitlab
# REQUIRE: NETWORKING SERVERS DAEMON LOGIN
# KEYWORD: shutdown
class Array
def comprehend &block
return self unless block
head, *tail = self.map(&:to_a)
return head.map(&block).compact if tail.empty?
return head.product(*tail).map(&block).compact
end
end
def sieve list
@remino
remino / Gemfile
Created January 9, 2014 18:01
kramdown-rails: Use Kramdown (Markdown) in Rails 4
# Gemfile
gem 'kramdown'
@staltz
staltz / introrx.md
Last active December 1, 2025 11:31
The introduction to Reactive Programming you've been missing
@stevejenkins
stevejenkins / opendmarc-send-multi-reports.sh
Last active January 24, 2018 04:54
Remote processing of multiple mail server's OpenDMARC history files
#!/bin/bash
# Script for remote processing of multiple mail server's OpenDMARC history files
# Based on a script from Hamzah Khan (http://blog.hamzahkhan.com/)
set -e
cd /tmp
# Remote Hosts, Database, and History File Info
HOSTS='mx1.example.com mx2.example.com mx3.example.com'

Angular2 + JSPM cheat sheet

First time setup

  • install jspm beta: npm install -g jspm@beta
  • set up your project: jspm init
  • install dependencies: jspm install angular2 reflect-metadata zone.js es6-shim

This will create a jspm_packages folder, and a config.js file.

Open the config.js file - this file manages options for the System.js loader - tweak it as appropriate

@yuvadm
yuvadm / ffmpeg-over-ssh.sh
Created February 7, 2016 23:10
Media stream pipe ffmpeg over SSH
ssh [email protected] "ffmpeg -i $URL -c copy -f nut pipe:1" | ffplay -i pipe:0
@joshschmelzle
joshschmelzle / ffmpeg-cut-out-video.cmd
Created November 29, 2016 18:17
Cut a video without re-encoding with ffmpeg
ffmpeg -i input.mp4 -c copy -ss 00:04:25.000 -to 00:09:25.000 output.mp4
@OdinsPlasmaRifle
OdinsPlasmaRifle / arch_linux_installation.md
Last active October 20, 2025 00:22
LVM on LUKS Arch installation with systemd-boot