Skip to content

Instantly share code, notes, and snippets.

View matthiasbeyer's full-sized avatar

Matthias Beyer matthiasbeyer

View GitHub Profile
@matthiasbeyer
matthiasbeyer / select_remind_entry.sh
Last active March 8, 2017 18:17
remind entry to ics with selection
#!/bin/bash
#
# The following script is a ugly hack. But it works, so yeah \m/
#
# It uses awk, cut, head, tail, rem2ics and fzf (whereas this is only for the
# selection-process and could be replaced).
#
# Purpose:
#
@matthiasbeyer
matthiasbeyer / base-configuration.nix
Created December 5, 2014 12:22
Nix modular configuration
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
/etc/nixos/hardware-configuration.nix
];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
@matthiasbeyer
matthiasbeyer / brachetmatcher.hs
Created November 19, 2014 12:33
Stack-based bracket matcher in Haskell
module Main
where
data Node = Node { chr :: Char
, next :: Maybe Node }
deriving (Show)
prepareInput :: String -> String
prepareInput str = filter (\c -> c `elem` ['(', ')']) str
@matthiasbeyer
matthiasbeyer / gist:08d8ea7ee810cb3a371e
Created September 30, 2014 20:23
C Code formatting
1. function pointer:
type (*ptr)(args)
which would be our style, will result in
type (* ptr)(args)
@matthiasbeyer
matthiasbeyer / uncrustify.cfg
Created September 30, 2014 20:09
Uncrustify configuration
# Uncrustify 0.60
#
# General options
#
# The type of line endings
newlines = lf # auto/lf/crlf/cr
# The original size of tabs in the input