Skip to content

Instantly share code, notes, and snippets.

View matthiasbeyer's full-sized avatar

Matthias Beyer matthiasbeyer

View GitHub Profile
@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
@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 / 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 / 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 / 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 / configuration.nix
Created January 17, 2015 11:29
Nix config list ++ list attempt
# ... some things here ...
environment.systemPackages = let
basePkgs = import "${configDir}/pkgs/basePackages.nix" pkgs;
devPkgs = import "${configDir}/pkgs/devPackages.nix" pkgs;
desktopPkgs = import "${configDir}/pkgs/desktopPackages.nix" pkgs;
networkPkgs = import "${configDir}/pkgs/networkingPackages.nix" pkgs;
vim = import "${configDir}/pkgs/vim/default.nix" pkgs;
in
basePkgs ++ devPkgs ++ desktopPkgs ++ networkPkgs ++ vim;
@matthiasbeyer
matthiasbeyer / dmenu.bash
Created February 8, 2015 17:31
dmenu-like bash script
list=""
for p in $(echo $PATH | sed 's,:, ,g')
do
list="$list $(find $p -type f -o -type l -executable 2>/dev/null)"
done
currlist=$list
x=".*"
while read -n 1 y;
use runtime::Runtime;
use std::error::Error;
use std::fmt::Formatter;
use std::fmt::Result as FMTResult;
use std::fmt::Display;
use std::path::Path;
use std::result::Result;
use module::todo::TodoModule;
@matthiasbeyer
matthiasbeyer / razorlight.vim
Last active November 3, 2015 20:52
razorlight vim colorscheme
"
" Version 1.0
" Author: Matthias Beyer <mail@beyermatthias.de>
" Date: 03-11-2015
" License: Public Domain
"
" ---
"
" Colorscheme for vim and neovim. Created mainly with vim.ink
"
@matthiasbeyer
matthiasbeyer / straceout
Created January 4, 2016 17:26
strace output of musescore on segfault
read(10, "712//\t\tINTERNAL\t\tIBM12712\t\t1\nmod"..., 4096) = 2847
read(10, "", 4096) = 0
close(10) = 0
munmap(0x7feaad925000, 4096) = 0
futex(0x7feaa6c688d0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/etc/X11/egl/atiapfxxES.blb", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/X11/atiogl_perfcount.conf", O_RDONLY) = -1 ENOENT (No such file or directory)
gettid() = 17783
gettid() = 17783
open("/etc/X11/atiogl.conf", O_RDONLY) = -1 ENOENT (No such file or directory)