Skip to content

Instantly share code, notes, and snippets.

@thraizz
thraizz / colors.vim
Created October 12, 2020 09:20
💜 dotfiles for reddit 💜
" ==============================================================================
" Name: One Half Dark
" Author: Son A. Pham <[email protected]>
" Url: https://github.com/sonph/onehalf
" License: The MIT License (MIT)
"
" A dark vim color scheme based on Atom's One. See github.com/sonph/onehalf
" for installation instructions, a light color scheme, versions for other
" editors/terminals, and a matching theme for vim-airline.
" ==============================================================================
@thraizz
thraizz / README.md
Last active November 14, 2020 15:14
Parse files in directory to a PlantUML Mindmap

Parse file structure to PlantUML

Call this python script with python parse.py to get the diagram for the current diagram or with python parse.py "./directory" to get it for ./directory.

@thraizz
thraizz / bash.md
Created November 12, 2020 12:04
Bash keyboard shortcuts

How-to: Bash Keyboard Shortcuts

Moving the cursor:

` Ctrl + a Go to the beginning of the line (Home) Ctrl + e Go to the End of the line (End) Ctrl + p Previous command (Up arrow) Ctrl + n Next command (Down arrow) Alt + b Back (left) one word Alt + f Forward (right) one word Ctrl + f Forward one character

@thraizz
thraizz / .xbindkeysrc
Created December 30, 2020 14:15
XF86 media key bindings using xbindkeys
"pactl set-sink-volume @DEFAULT_SINK@ -1000"
XF86AudioLowerVolume
"pactl set-sink-volume @DEFAULT_SINK@ +1000"
XF86AudioRaiseVolume
"playerctl play-pause"
m:0x0 + c:208
XF86AudioPlay
"playerctl play-pause"
m:0x0 + c:209
XF86AudioPause
@thraizz
thraizz / Document.test.js
Created January 7, 2021 09:49
Vue Testing Example with Jest and Cypress
import { WikiDocument } from '@/classes/Document.js'
import { encodeUnicode } from '@/services/helpers/dataFormatter'
const FIRST_DOCUMENT = {
document: {
approval_state: false,
data: 'This is the first document.',
id: 'as9hd98ktp7g3',
namespace: ':FirstNamespace',
rid: 'as98dfgy',
@thraizz
thraizz / README.md
Last active March 26, 2021 15:11
Freqtrade Backtest: 365 days (2020/2021)

Freqtrade Backtest w. Binance Data for all Coins (2020/02/18-2021/02/18)

What is this?

These are the results of a rather long backtest for all coins listed on binance that are tradable to BTC. The first three strategies are cut off, as my terminal buffer was too small to hold all data. All strategies are taken from the freqtrade strategy repository and are not adapted in any way.

Configuration

Some of the more important options are:

{
 "max_open_trades": 20,
@thraizz
thraizz / node_exporter.service
Last active July 16, 2021 14:55
Downloads, extracts, enables and starts node_exporter
[Unit]
Description=Node Exporter
[Service]
User=node_exporter
EnvironmentFile=/etc/sysconfig/node_exporter
ExecStart=/opt/node_exporter/node_exporter $OPTIONS
[Install]
WantedBy=multi-user.target
@thraizz
thraizz / copyJSONPath.lua
Created July 5, 2022 08:27
NVIM: Copy cursor-location's path in json with treesitter
local copyJSONPath = function()
local ts_utils = require 'nvim-treesitter.ts_utils'
local result = {};
local node = ts_utils.get_node_at_cursor()
while node do
if tostring(node) == '<node pair>' then
local key_node = node:named_child(0):named_child(0)
table.insert(result, 1, ts_utils.get_node_text(key_node)[1])
end
node = node:parent()
@thraizz
thraizz / button.html
Created January 9, 2023 10:48
Sign in with Google - tailwind styles, html button
<button
class="rounded-md text-[#757575] border border-gray-300 pr-[8px] h-10 items-center flex"
style={{
fontFamily: "Roboto",
fontWeight: 500,
}}
>
<svg xmlns="http://www.w3.org/2000/svg" width="46" height="46">
<g fill="none" fill-rule="evenodd">
<path
@thraizz
thraizz / README.md
Last active August 16, 2023 12:19
PUFO Folgen

PUFO FETCHER

Was macht es?

Kleines script um alle Folgen des Podcast UFOs zu fetchen. Benutze die uids dann in einem iOS Shortcut, welcher die JSON holt, ein random item aus items auswählt und dies URI öffnet. Das öffnet dann Spotify :D

Der shortcut: https://www.icloud.com/shortcuts/9a51226503d14c8a8a61dba9645bf4b3

Andere Podcasts?

Klar, geht bestimmt wenn man die url in fetchEpisodes anpasst