Skip to content

Instantly share code, notes, and snippets.

View fredRos's full-sized avatar

Frederik Beaujean fredRos

View GitHub Profile
@fredRos
fredRos / .spacemacs
Last active April 28, 2020 20:21
set color of line number for solarized light theme in spacemacs
(defun dotspacemacs/layers ()
theming
)
(defun dotspacemacs/init ()
dotspacemacs-themes '(solarized-light)
)
(defun dotspacemacs/user-init ()
(setq theming-modifications
'(
(solarized-light
@fredRos
fredRos / .emacs
Created May 8, 2017 08:37
Minimal syntax highlighting for emails. Colorize multiple quotes up to 5 levels in different colors. Use with thunderbird as external editor.
;; 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 April 25, 2017 11:46
Syntax highlighting of doxygen-style markdown in 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 March 23, 2017 08:38
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
// Copyright (c) 2017 Frederik Beaujean ([email protected])
// 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 March 9, 2023 14:22
Setup emacs with github markdown and pandoc offline rendering

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 August 29, 2015 14:02
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 [email protected]
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 March 3, 2024 12:11
Install DVB-T stick 048d:9135 Integrated Technology Express, Inc. Zolid Mini DVB-T Stick in debian

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 May 18, 2024 15:48
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: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Description: UNKNOWN
Platform: UNKNOWN