This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Runs a scheduled job in a background thread using APScheduler and streams | |
# it's output to a web client using websockets. Communication between the Flask | |
# thread and APScheduler thread is being done through (blinker) signals. | |
# | |
# Install dependencies (preferably in your virtualenv) | |
# pip install flask apscheduler sqlalchemy blinker flask-socketio simple-websocket | |
# and then run with: | |
# python this_script.py | |
from time import sleep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Backs up and restores tilix settings | |
set -e | |
if [[ $1 == 'backup' ]]; then | |
dconf dump '/com/gexperts/Tilix/' > tilix-settings.dconf | |
echo "backup done" | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Backs up and restores gnome3 keybindings | |
# Tested with Gnome 3.36.8 | |
# by peterrus | |
set -e | |
mkdir -p gnome3-keybind-backup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
FOLDER_NAME=bw-export-$(date "+%Y%m%d-%H%M%S") | |
mkdir $FOLDER_NAME | |
cd $FOLDER_NAME | |
export BW_SESSION=$(bw unlock --raw) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Colors and fonts | |
# Only loaded on interactive terminals | |
if [ -t 0 ]; then | |
T_ERROR=$(tput setaf 7; tput setab 1) | |
T_INFO=$(tput setaf 7; tput setab 4) | |
T_WARNING=$(tput setaf 0; tput setab 3) | |
T_SUCCESS=$(tput setaf 0; tput setab 2) | |
T_BOLD=$(tput bold) | |
T_RESET=$(tput sgr0) | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.5" | |
# Setup: | |
# Create .env file containing (without the #'s) | |
# TRAEFIK_DASHBOARD_DOMAIN=dashboard.domain.com | |
# TRAEFIK_DASHBOARD_ADMIN_PASSWORD=generate_this_with_htpasswd | |
# POSTGRES_PASSWORD=s3cr3tstr1ng | |
# DOMAIN=wow.domain.com | |
# [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Saltstate to install netdata + requirements, tries to update netdata every time this state is applied | |
# original by https://github.com/saivert: https://github.com/firehol/netdata/issues/798#issuecomment-242472276 | |
# modified to work on ubuntu 14.04 and 16.04 by https://github.com/peterrus | |
netdatarequisites: | |
pkg.installed: | |
- pkgs: | |
{% if grains['os'] == 'Gentoo' %} | |
- sys-devel/autoconf | |
- sys-devel/autoconf-archive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^!h::Run "C:\Program Files\VideoLAN\VLC\vlc.exe" --intf dummy "C:\Users\user\Documents\mccree.mp3" --volume 200 --play-and-exit | |
^!p::Run "C:\Program Files\VideoLAN\VLC\vlc.exe" --intf dummy "C:\Users\user\Documents\zenyatta.m4r" --volume 200 --play-and-exit | |
^!l::Run "C:\Program Files\VideoLAN\VLC\vlc.exe" --intf dummy "C:\Users\user\Documents\lucio.m4r" --volume 200 --play-and-exit | |
^!j::Run "C:\Program Files\VideoLAN\VLC\vlc.exe" --intf dummy "C:\Users\user\Documents\hanzo.m4r" --volume 200 --play-and-exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Media_Next::Send {End} | |
Media_Prev::Send {Home} | |
Media_Stop::Send {PgUp} | |
Media_Play_Pause::Send {PgDn} | |
^Media_Next::Send ^{End} | |
^Media_Prev::Send ^{Home} | |
^Media_Stop::Send ^{PgUp} | |
^Media_Play_Pause::Send ^{PgDn} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//random imgur image selector (quite a dirty approach) | |
//issues:returns ocassionaly 404's while the image in fact exists | |
$str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; | |
while(true) { | |
//variables | |
$shuffled = str_shuffle($str); |