Skip to content

Instantly share code, notes, and snippets.

@daktak
daktak / bot.txt
Last active July 15, 2023 23:33
ZOffline bot.txt 400 male and female with Team initials
{
"riders": [
{
"country_code": 705,
"is_male": true,
"first_name": "Tadej",
"last_name": "Poga\u010dar (UAD)",
"ride_jersey": 1751349769,
"bike_frame": 3628259811,
"bike_wheel_front": 2223270801,
@daktak
daktak / update-template.sh
Created June 29, 2022 01:44
Qubes-os update template
#!/bin/bash
NEW_TEMPLATE=$2
OLD_TEMPLATE=$1
DVM_NAME=$4
OLD_DVM_NAME=$3
if [[ -z ${NEW_TEMPLATE} ]]; then
echo "update-template.sh oldtemplate newtemplate [olddvm] [newdvm]"
exit 1
fi
if [[ -z ${DVM_NAME} ]]; then
@daktak
daktak / zwift_world.sh
Created December 14, 2021 08:35
Set world in Zwift prefs.
#!/bin/bash
USER=`whoami`
DIR="/home/${USER}/Games/zwift/drive_c/users/daktak/Documents/Zwift"
case $1 in
1 | Watopia )
WORLD=2
;;
2 | Richmond )
WORLD=2
@daktak
daktak / zwift.sh
Last active December 10, 2021 00:08
Execute Zwift via cli (lutris)
#!/bin/bash
xset s off # don't activate screensaver
xset -dpms # disable DPMS (Energy Star) features.
xset s noblank # don't blank the video device
USER=`whoami`
PATH=/home/${USER}/Games/zwift
GAME_LOCATION="${PATH}/drive_c/Program Files (x86)/Zwift"
RUNNER=lutris-fshack-6.21-6-x86_64
@daktak
daktak / ffmpeg_record_screen.sh
Last active December 22, 2023 20:34
Ffmpeg record selected window. Written for Qubes-OS
#!/bin/bash
#pass in alsa or pulse to record from sound device
IFS=$
#omit the top pixels to hide tabs and address bar
FIREFOX_Y_BUFFER=94
FIREFOX_X_BUFFER=2
if [[ ${1} =~ alsa ]] ; then
sound="-f alsa -ac 2 -i hw:0"
fi
if [[ ${1} =~ pulse ]] ; then
@daktak
daktak / qvm-exposeip.sh
Last active June 17, 2022 02:59
Qubes-os port forwarding to allow external connections
#!/bin/sh
#4.0
#ip() { qvm-ls --raw-data ip -- "$1"; }
##4.1
ip() { qvm-ls --raw-data --fields ip -- "$1"; }
netvm() { qvm-prefs -g -- "$1" netvm; }
forward() {
local from_domain=$1
local to_domain=$2
@daktak
daktak / qvm-talk.sh
Last active January 9, 2017 05:15
Qubes-OS allow two appvms to talk to each other
#!/bin/bash
vm1=$1
vm2=$2
fw=$3
ip1=`qvm-run -p -u root ${vm1} "ifconfig eth0 | grep 'inet ' | column -t | cut -d ' ' -f3"`
ip2=`qvm-run -p -u root ${vm2} "ifconfig eth0 | grep 'inet ' | column -t | cut -d ' ' -f3"`
if [ -z ${fw} ]; then
fw=sys-firewall
fi
#!/bin/env python2
#
#
##############################################################################
### NZBGET POST-PROCESSING SCRIPT ###
# chmod for nzbget
# NOTE: This script requires Python to be installed on your system.
##############################################################################
### OPTIONS ###
@daktak
daktak / SendFiles.py
Last active August 29, 2015 14:21
Modified to support conversion of files before sending
#!/usr/bin/env python2
# GistID: 8f261d9852d5fc0bcfe8
#
# Send files post-processing script for NZBGet
#
# Copyright (C) 2013 Andrey Prygunkov <hugbug@users.sourceforge.net>
#
# 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 2 of the License, or
#!/usr/bin/env python2
# GistID: 2a0460ce2b2243ffaa55
#
# Add NZB file to the queue
#
# Copyright (C) 2013 Andrey Prygunkov <hugbug@users.sourceforge.net>
#
# This program is free Series; 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 2 of the License, or