Skip to content

Instantly share code, notes, and snippets.

@dluciv
dluciv / LICENSE.txt
Last active December 29, 2015 07:49 — forked from 140bytes/LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@dluciv
dluciv / пше
Last active March 2, 2016 09:16 — forked from piranha/пше
пше гит, прошу пана
#!/usr/bin/env python3
# -*- mode: python, coding: utf-8 -*-
#
# This incredible piece of code makes git a bit Polish, a bit Western Ukrainian,
# пше прошу пана
# Joke is based on fact that 'git' is 'пше' in qwerty/йцукен layouts
#
# (c) 2013 Alexander Solovyov under terms of WTFPL
# (c) 2015 Dmitry Luciv under terms of WTFPL v 2 -- Python 3 translation
@dluciv
dluciv / citeorder.rb
Created March 30, 2017 07:05
LaTeX `\cite{...}` order
#!/usr/bin/env ruby
# Author: Dmitry V. Luciv
# License: WTFPL 2.0 http://wtfpl.net
=begin
When typing many \bibitem's manually, instead of using BibTeX and friends,
it often becomes a pain to sort the bibliography in case when it should
appear in order of citations.
@dluciv
dluciv / gist:2ac78daefee60b433aea3522afbfe329
Created April 2, 2017 07:17 — forked from haydio/gist:647d530638bf8f4fdcdb
RouterOS IPv6 Firewall Rules
/ipv6 firewall filter
add action=accept chain=input comment="Allow established connections" connection-state=established disabled=no
add action=accept chain=input comment="Allow related connections" connection-state=related disabled=no
add action=accept chain=input comment="Allow ICMP" disabled=no protocol=icmpv6
add action=accept chain=input comment="Allow UDP" disabled=no protocol=udp
add action=drop chain=input comment="" disabled=no
add action=accept chain=forward comment="Allow any to internet" disabled=no out-interface=sit1
add action=accept chain=forward comment="Allow established connections" connection-state=established disabled=no
add action=accept chain=forward comment="Allow related connections" connection-state=related disabled=no
add action=accept chain=forward comment="Allow ICMP" disabled=no protocol=icmpv6
@dluciv
dluciv / The Hobbit Graph.adoc
Created November 13, 2020 15:10 — forked from kvangundy/The Hobbit Graph.adoc
The Hobbit Graph, "Nodes and Back Again"

The Hobbit Graph, or To Nodes and Back Again

AIjVQ6c
@dluciv
dluciv / macv
Last active January 20, 2022 10:54
Mac OS get & set output volume from command line
#!/usr/bin/env zsh
mac_max_set=100.0
mac_max_get=100.0
# $ brew install blackhole-2ch switchaudio-osx
# https://github.com/ExistentialAudio/BlackHole
# https://github.com/deweller/switchaudio-osx
# made my day.
# But when first one is used within default output of multi-output device, AppleScript Fails to get output volume.
@dluciv
dluciv / README.md
Last active December 31, 2022 10:31
Sway + WayVNC minimal headless config

Requirements

Fundamental:

  • Sway
  • Wayvnc

Current config:

  • Waybar
@dluciv
dluciv / rofi-xkb-type
Last active June 17, 2023 18:42
Rofi type exotic keys
#!/bin/zsh
# Usage: rofi -modes xkdtype:rofi-xkb-type -show xkdtype
# echo $(date) RETV: $ROFI_RETV INFO: $ROFI_INFO ARGS: $* >>/tmp/rofi-xkb-type.log
nil="\0"
sep="\x1f"
# detect backend
if [[ -n $WAYLAND_DISPLAY ]]; then
@dluciv
dluciv / README.md
Last active January 23, 2023 17:59
ShitPad

ShitPad

Turns any cup of coffee priced numpad into a macro-keyboard.

  1. Put or link shitpad file to ~/.config/xkb/symbols, $ ln -s /usr/share/X11/xkb/keycodes/evdev ~/.config/xkb/symbols/shitpad
  2. Config sway as below