Skip to content

Instantly share code, notes, and snippets.

Avatar

Armin Widegreen awidegreen

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am awidegreen on github.
  • I am awidegreen (https://keybase.io/awidegreen) on keybase.
  • I have a public key whose fingerprint is 9F98 8188 C567 1909 E778 8F5E C740 AF6C 3C4D 4239

To claim this, I am signing this object:

@awidegreen
awidegreen / pia_swe.ovpn
Last active Apr 14, 2022
rtorrent through openvpn
View pia_swe.ovpn
client
dev tun
# "Allow calling of built-in executables and user-defined scripts." In other
# words, this must be specified for the `up` script to be executed.
script-security 2
route-nopull
up vpn-up.sh
down vpn-down.sh
@awidegreen
awidegreen / fuzzyclock_german.sh
Created Oct 29, 2013
a german fuzzyclock in shell
View fuzzyclock_german.sh
#!/bin/bash
###################################################################################
# Copyright (c) 2009 Armin Widegreen <armin.widegreen@gmail.com> #
# #
# This program is free software; you can redistribute it and/or modify it under #
# the terms of the GNU General Public License as published by the Free Software #
# Foundation, either version 3 of the License, or (at your option) any later #
# version. #
# #
@awidegreen
awidegreen / rts5139.conf
Created Sep 30, 2013
blackling rts5139 sd card reader until kernel 3.11 release, under /etc/modprobe.d/
View rts5139.conf
# disable card reader until it is fixed with 3.11
blacklist rts5139
@awidegreen
awidegreen / promiscuous@.service
Created Jul 16, 2013
systemd service for promiscuous mode. On archlinux, store it under /etc/systemd/system/promiscuous@.service enable it with: systemctl enable promiscuous@enp1s0.service Difference between file from archwiki: add "After" and changed path from "/usr/sbin/ip" to "/usr/bin/ip" since every executable is now located there
View promiscuous@.service
[Unit]
Description=Set %i interface in promiscuous mode
After=network.target
[Service]
Type=oneshot
ExecStart=/usr/bin/ip link set dev %i promisc on
RemainAfterExit=yes
[Install]
@awidegreen
awidegreen / pulseaudio.service
Last active Jun 2, 2022
systemd definition for pulseaudio in system-mode (example for archlinux). The pulseaudio developers explicitly recommend to NOT run pulseaudo system-mode!
View pulseaudio.service
# systemd service spec for pulseaudio running in system mode -- not recommended though!
# on arch, put it under /etc/systemd/system/pulseaudio.service
# start with: systemctl start pulseaudio.service
# enable on boot: systemctl enable pulseaudio.service
[Unit]
Description=Pulseaudio sound server
After=avahi-daemon.service network.target
[Service]
ExecStart=/usr/bin/pulseaudio --system --disallow-exit --disallow-module-loading
@awidegreen
awidegreen / poweronlinux.md
Created Jul 14, 2013
Some hints on how to save some power on linux, in my case arch on a samsung series 7 ultra
View poweronlinux.md
@awidegreen
awidegreen / arm_boards.md
Last active Dec 19, 2015
List of (full) equipped ARM boards: just to keep an overview
View arm_boards.md
@awidegreen
awidegreen / csh_complete_wrapper.rb
Last active Dec 16, 2015
A parameter completion wrapper for (t)csh. It can be called from the built-in csh complete command
View csh_complete_wrapper.rb
#!/usr/bin/env ruby
#
# This is a wrapper to query the appropiate command/parameter
# completions for (t)csh.
#
# Armin Widegreen (c) 2013
#
# A call returns a space-seperated string
# of the possible completions, e.g.:
# ParameterCompletion.getCompletionString("cmd1 diff")
@awidegreen
awidegreen / vimrc
Created Feb 24, 2013
vim header file hook to include template
View vimrc
fun! CppHeaderFileHook()
let l:filename = tolower(expand("%"))
let l:filename = substitute(l:filename, ".hh$","_HH_", "")
let l:filename = toupper(l:filename)
source ~/templates/cpp_header.template
execute "silent %s/FILENAME_HH_/".l:filename."/g"
endfun
autocmd BufNewFile *.hh call CppHeaderFileHook()