Skip to content

Instantly share code, notes, and snippets.


Frederik Beaujean fredRos

View GitHub Profile
fredRos / .spacemacs
Last active Apr 28, 2020
set color of line number for solarized light theme in spacemacs
View .spacemacs
(defun dotspacemacs/layers ()
(defun dotspacemacs/init ()
dotspacemacs-themes '(solarized-light)
(defun dotspacemacs/user-init ()
(setq theming-modifications
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
(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 / .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
(font-lock-add-keywords 'markdown-mode
;; mark each of three groups differently
;; @section label title
'(("^\\(@section\\) \\(.+?\\) \\(.+?\\)$"
(1 font-lock-constant-face)
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)
View partitions.cxx
// Copyright (c) 2017 Frederik Beaujean (
// 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 /
Last active Sep 30, 2020
Setup emacs with github markdown and pandoc offline rendering

Based on this blog.

This guide shows you how to setup emacs to render a 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 /
Last active Aug 29, 2015
Install ROOT 5.34 without sudo rights

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 install
fredRos / a
Last active Jun 26, 2016
Install DVB-T stick 048d:9135 Integrated Technology Express, Inc. Zolid Mini DVB-T Stick in debian
View a

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 / 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.
Metadata-Version: 1.0
Name: fred_emcee_swig
Version: 1.0
Summary: UNKNOWN
Home-page: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Description: UNKNOWN
Platform: UNKNOWN