Skip to content

Instantly share code, notes, and snippets.

Frederik Beaujean fredRos

  • Munich
Block or report user

Report or block fredRos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fredRos
fredRos / .emacs
Created May 8, 2017
Minimal syntax highlighting for emails. Colorize multiple quotes up to 5 levels in different colors. Use with thunderbird as external editor.
View .emacs
;; http://ergoemacs.org/emacs/elisp_syntax_coloring.html
(setq fredmail-highlights
'(("^[ \t]*>>>>>.*$" . 'org-level-5)
("^[ \t]*>>>>.*$" . 'org-level-4)
("^[ \t]*>>>.*$" . 'org-level-3)
("^[ \t]*>>.*$" . 'org-level-2)
("^[ \t]*>.*$" . 'org-level-1)
("\\*.*\\*" . 'markdown-bold-face)
))
@fredRos
fredRos / .emacs
Last active Apr 25, 2017
Syntax highlighting of doxygen-style markdown in emacs
View .emacs
;; After a part is matched, it is no longer modified
;; => put catch-all patterns last
;; https://www.emacswiki.org/emacs/AddKeywords
;; https://www.emacswiki.org/emacs/RegularExpression
;; https://www.gnu.org/software/emacs/manual/html_node/elisp/Faces-for-Font-Lock.html#Faces-for-Font-Lock
(font-lock-add-keywords 'markdown-mode
;; mark each of three groups differently
;; @section label title
'(("^\\(@section\\) \\(.+?\\) \\(.+?\\)$"
(1 font-lock-constant-face)
@fredRos
fredRos / partitions.cxx
Last active Mar 23, 2017
Create integer partitions in multiplicity representation. Either all partitions of n or into exactly k parts. The basis is algorithm Z from A. Zoghbi: Algorithms for generating integer partitions, Ottawa (1993) http://dx.doi.org/10.20381/ruor-11312
View partitions.cxx
// Copyright (c) 2017 Frederik Beaujean (Frederik.Beaujean@lmu.de)
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
@fredRos
fredRos / steps.md
Last active Jul 5, 2018
Setup emacs with github markdown and pandoc offline rendering
View steps.md

Based on this blog.

This guide shows you how to setup emacs to render a README.md very similarly to how github will do it; except it also works offline. There are no dependencies that can't be easily installed via the package manager on ubuntu.

  1. Install emacs24, the markdown mode, and pandoc. You may need the packages emacs, emacs-goodies-el, and pandoc.
  2. Get a style sheet that resembles the github style from this gist and store it. I put it in ~/emacs.d/github-pandoc.css.
@fredRos
fredRos / ROOT-installation.md
Last active Aug 29, 2015
Install ROOT 5.34 without sudo rights
View ROOT-installation.md

If you install locally without sudo rights, watch out for access to /etc/root. Parts of ROOT will not work but it doesn't show immediately. Set etcdir manually!

swmod setinst root@5.34.18
export ROOTSYS=$HOME/.local/sw/root/linux-debian-testing-x86_64/5.34.18
swmod ./configure --enable-mathmore --enable-minuit2 --enable-roofit --etcdir=$HOME/local/sw/root/linux-debian-testing-x86_64/5.34.18/etc/root
make
make install
@fredRos
fredRos / a dvb-t.md
Last active Jun 26, 2016
Install DVB-T stick 048d:9135 Integrated Technology Express, Inc. Zolid Mini DVB-T Stick in debian
View a dvb-t.md

Identify the device

Plug it in

$ lsusb
Bus 005 Device 005: ID 048d:9135 Integrated Technology Express, Inc. Zolid Mini DVB-T Stick
...
$ dmesg | grep fail
[    7.865077] usb 5-1: firmware: failed to load dvb-usb-it9135-01.fw (-2)
@fredRos
fredRos / PKG-INFO
Last active Apr 2, 2018
Minimal example to demonstrate how to use the sampler written in python to sample from a class method defined in C++. It also shows how get it to run with mpi4py to run on hundreds of processors.
View PKG-INFO
Metadata-Version: 1.0
Name: fred_emcee_swig
Version: 1.0
Summary: UNKNOWN
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Description: UNKNOWN
Platform: UNKNOWN
You can’t perform that action at this time.