Skip to content

Instantly share code, notes, and snippets.

View rxw1's full-sized avatar
☠️

rxw1

☠️
  • Upper Silesia, Germany
View GitHub Profile
@rxw1
rxw1 / n.sh
Created January 24, 2018 04:08
number pyramid
#!/usr/bin/env zsh
n=(
" 1 * 8 + 1"
" 12 * 8 + 2"
" 123 * 8 + 3"
" 1234 * 8 + 4"
" 12345 * 8 + 5"
" 123456 * 8 + 6"
" 1234567 * 8 + 7"
@rxw1
rxw1 / mdcolors.sh
Last active May 23, 2018 01:31
Get hex values and color names for Googles Material Design Color Palette
#!/usr/bin/env zsh
curl -s https://material.io/guidelines/style/color.html |\
pup 'div.col-list section.module-module-module.col-3:nth-last-of-type(n+2) div span text{}' |\
awk '/^[A-Z][a-z]+/{cat=$0} /^[A]{0,1}[0-9]{2,3}/{shade=$0} /^#[0-9A-F]{6}/ {printf("%4s, %-11s, %s\n",shade,cat,$0)}' |\
cat -n |\
sort -t, -k3 |\
tac |\
uniq -f1 |\
sort -nk1 |\
@rxw1
rxw1 / sort-rate-delete.sh
Created April 18, 2018 10:26
Rate Sort Delete
#!/usr/bin/env zsh
music=/mnt/unsort/storage/music
playing=$music/$(mpc -f %file% current)
case $1 in
rate)
if [[ $2 -ge 0 ]] && [[ $2 -lt 6 ]]; then
mpc sticker "$(mpc -f %file% current)" set rating $2
fi
@rxw1
rxw1 / spinoza.tex
Created May 5, 2018 21:36
Rationalism vs. Empiricism
\begin{tikzpicture}[grow cyclic, text width=2.3cm, align=flush center, outer sep=0.5cm,
level 1/.style={level distance=3.3cm,sibling angle=180},
level 2/.style={level distance=3.3cm,sibling angle=45},
level 3/.style={level distance=3.3cm,sibling angle=45}]
\tikzstyle{blue} = [text=MidnightBlue]
\tikzstyle{red} = [text=WildStrawberry]
\tikzstyle{book} = [font=\itshape]
\node(root){17. 18. Jahrhundert}
@rxw1
rxw1 / cVimrc
Last active December 17, 2022 13:24
cVimrc
site '*://*/*' {
unmap x
unmap p
unmap o
}
site '*://mail.google.com/*' {
unmap e
unmap j
unmap k
unmap c
@rxw1
rxw1 / linux-network-routing.md
Last active March 17, 2019 03:21
Linux Network Routing
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Deutschland</title>
<script src="https://d3js.org/d3.v5.js"></script>
<script src="https://unpkg.com/topojson@3"></script>
<script src="https://d3js.org/d3-scale-chromatic.v1.min.js"></script>
@rxw1
rxw1 / package.json
Created October 13, 2019 04:02 — forked from tomgp/package.json
Server side SVG via D3 & jsdom
{
"name": "simple-node-d3",
"version": "1.0.0",
"description": "Serverside SVG via D3 & jsdom",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "[email protected]",
"license": "ISC",
@rxw1
rxw1 / config.h
Last active November 8, 2019 23:52
st config
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "Envy Code R:pixelsize=24:style=Regular:antialias=true:autohint=true";
static int borderpx = 24;
#!/usr/bin/env zsh
get () {
url="http://datawrapper.dwcdn.net/lR5wn/21/"
curl -s $url | awk '
/chartData:/ {
gsub("^.*chartData: \"", "");
gsub("\".$", "");
gsub(/\\n/, "\n");
gsub("\\\\u00fc", "ü");