Skip to content

Instantly share code, notes, and snippets.

Robert Riemann rriemann

Block or report user

Report or block rriemann

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
@rriemann
rriemann / x1c6.md
Created Aug 24, 2018 — forked from JZfi/x1c6.md
Lenovo ThinkPad X1 Carbon 6th gen (X1C6) and openSUSE Tumbleweed notes
View x1c6.md

Model 20KH-006MMX (with NFC & HDR) notes for stuff I've done this far to get the machine to an usable state.

openSUSE Tumbleweed works ok and touchpad & trackpoint & hibernation works out-of-the-box (not the case with Ubuntu 18.04 LTS).

To test out hibernation just type (after this it will appear in the GNOME menus):

# systemctl hibernate

BIOS

@rriemann
rriemann / csv2table.hs
Created Apr 30, 2018 — forked from baig/csv2table.hs
A Pandoc filter that replaces Image links having *.csv extension with Pandoc Markdown Tables.
View csv2table.hs
#!/usr/bin/env runhaskell
{-
The MIT License (MIT)
Copyright (c) 2015 Wasif Hasan Baig <pr.wasif@gmail.com>
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
View jekyll-flickresponsive.rb
require 'flickraw'
module Jekyll
class FlickresponsiveTag < Liquid::Tag
def initialize(tag_name, text, tokens)
super
@text = text
FlickRaw.api_key=Jekyll.configuration({})['flickr']['api_key']
FlickRaw.shared_secret=Jekyll.configuration({})['flickr']['secret']
View README.md

Preparation

curl -sS https://www.i-dont-care-about-cookies.eu/abp/ > bannerlist.txt && \
curl -sS https://publicsuffix.org/list/public_suffix_list.dat > public_suffix_list.dat

The alternative browser_commands.py adds also labels to the database of links generated by the links extract command.

@rriemann
rriemann / stats.sh
Created Feb 9, 2018
Static Text Analysis: Word Frequency
View stats.sh
# https://unix.stackexchange.com/a/41480/148389
# https://unix.stackexchange.com/a/171604/148389
# here, the file to analyise is parts.md
cat parts.md | tr -c '[:alnum:]' '[\n*]' | tr '[:upper:]' '[:lower:]' | fgrep -v -w -f /usr/share/groff/1.22.3/eign | sort | uniq -c | sort -nr | head -20
@rriemann
rriemann / convert.sh
Created Feb 9, 2018
convert pictures in for loop
View convert.sh
#!/usr/bin/env bash
find . -print0 | while read -d $'\0' file
do
convert -size 800x800 ${file} -resize 800x800 +profile '*' ${file%\.*}_big.jpg
convert -size 200x150 ${file} -resize 200x150 +profile '*' ${file%\.*}_small.jpg
echo "<a class=\"zoom\" rel=\"group02\" title=\"${file}\" href=\"{relocatable: /referenzen/${file%\.*}_big.jpg}\"><img src=\"{relocatable: /referenzen/${file%\.*}_small.jpg}\" alt=\"\" /></a>"
done
@rriemann
rriemann / table-filter.py
Created Aug 19, 2017
Pandoc Floating Tables
View table-filter.py
#!/usr/bin/env python3
# based on https://groups.google.com/d/msg/pandoc-discuss/RUC-tuu_qf0/h-H3RRVt1coJ
import pandocfilters as pf
import sys
import re
def latex(s):
return pf.RawBlock('tex', s)
@rriemann
rriemann / features.geojson
Last active Jun 23, 2017
Impressions from Romania
View features.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View keybase.md

Keybase proof

I hereby claim:

  • I am rriemann on github.
  • I am rriemann (https://keybase.io/rriemann) on keybase.
  • I have a public key whose fingerprint is 748F FAD5 40A1 FC46 4035 140A E2F5 D37D 8CA0 510F

To claim this, I am signing this object:

View pdfScale.sh
#!/bin/bash
# pdfScale.sh
#
# Scale PDF to specified percentage of original size.
# Ref: http://ma.juii.net/blog/scale-page-content-of-pdf-files.
echo "This script doesn't handle files with spaces in them."
SCALE=0.95 # scaling factor (0.95 = 95%, e.g.)
You can’t perform that action at this time.