Skip to content

Instantly share code, notes, and snippets.

View jgosmann's full-sized avatar

Jan Gosmann jgosmann

View GitHub Profile
@jgosmann
jgosmann / RAV328.lircd.conf
Created December 11, 2023 19:06
lircd configuration file for the RAV328 remote used by the Yamaha RX-V461 A/V receiver
# RAV328 remote for Yamaha RX-V461 receiver
# Based on codes found in http://hifi-remote.com/forums/dload.php?action=file&file_id=9582
begin remote
name RAV328
bits 32
flags SPACE_ENC|CONST_LENGTH
gap 108000
@jgosmann
jgosmann / .minttyrc
Created May 31, 2019 11:08
My MinTTY config
Font = Liberation Mono
FontHeight = 10
Columns = 120
Rows = 40
Locale = en_US
Charset = UTF-8
CursorType = block
ForegroundColour=131, 148, 150
BackgroundColour= 0, 43, 54
Font = Liberation Mono
FontHeight = 10
Columns = 120
Rows = 40
Locale = en_US
Charset = UTF-8
CursorType = block
ForegroundColour=131, 148, 150
BackgroundColour= 0, 43, 54
@jgosmann
jgosmann / .ideavimrc
Created December 15, 2018 19:15
IdeaVim key remappings
" Neo2 remappings
noremap s h
noremap n gj
noremap r gk
noremap t l
" kill
noremap k s
" jump
noremap j n
" hide
@jgosmann
jgosmann / conf.py
Created June 7, 2018 18:41
Select Jupyter kernel for nbsphinx.
if 'NENGO_NBSPHINX_KERNEL' in os.environ:
nbsphinx_kernel_name = os.environ['NENGO_NBSPHINX_KERNEL']
else:
from jupyter_client.kernelspecapp import KernelSpecManager
kernels = sorted(KernelSpecManager().find_kernel_specs())
print("Available Jupyter kernels:")
for i, kernel in enumerate(kernels):
print(" {}. {}".format(i + 1, kernel))
nbsphinx_kernel_name = None
while nbsphinx_kernel_name not in kernels:
@jgosmann
jgosmann / format-latex.py
Created January 20, 2017 20:54
Format latex with one sentence per line
import re
import sys
import pyparsing as pp
escaped = pp.Combine(
pp.Literal('\\') + pp.CharsNotIn('', exact=1)).setResultsName('percent').leaveWhitespace()
comment = pp.Combine(pp.Literal('%') + pp.restOfLine).setResultsName('comment').leaveWhitespace()
args = pp.Forward()
group = pp.Forward()
#!/usr/bin/env python
"""Run either pyvenv or virtualenv depending on the version of Python used.
To use this with virtualenvwrappper, install it into a directory on your
``PATH`` as 'virtualenv-select' and add the following to your
``~/.bashrc``:
export VIRTUALENVWRAPPER_VIRTUALENV=virtualenv-select
.. note::
@jgosmann
jgosmann / pre-push
Created June 16, 2016 15:17
Prevent pushing fixup, squash, and WIP commits to master.
#!/bin/sh
# An example hook script to verify what is about to be pushed to master. Called
# by "git push" after it has checked the remote status, but before anything has
# been pushed. If this script exits with a non-zero status nothing will be
# pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# Configuration file for ipython-notebook.
c = get_config()
c.IPKernelApp.matplotlib = 'inline'
#------------------------------------------------------------------------------
# NotebookApp configuration
#------------------------------------------------------------------------------
# NotebookApp will inherit config from: BaseIPythonApplication, Application
c = get_config()
c.JupyterWidget.font_size = 11
c.JupyterWidget.height = 30
c.JupyterWidget.width = 140
c.JupyterWidget.syntax_style = 'solarizedlight'
c.JupyterQtConsoleApp.confirm_exit = False