This file contains hidden or 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
#NoTrayIcon | |
*A::Send,4 | |
*B::Send,|3 | |
*C::Send,`{ | |
*D::Send,|) | |
*E::Send,3 | |
*F::Send,f | |
*G::Send,6 | |
*H::Send,|-| |
This file contains hidden or 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
@echo off | |
REM BATCH FILE CREATED BY CHARLES DE HAVILLAND 20/02/2012 | |
cls | |
If "%1"=="" GOTO :norulename | |
SET RULENAME=%1 | |
ECHO Create in/out firewall rules for all *.exe files with the rulename of "%RULENAME%" ? | |
ECHO. | |
pause | |
Echo. |
This file contains hidden or 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
""" | |
music-archiver | |
This script is used to archive music albums from a source directory to a flexible number of destination directories. | |
""" | |
import os, shutil | |
# make a list of folders to archive from the current directory |
This file contains hidden or 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
""" | |
Serialtypist.py - Break a string into words, generate an image using a random font for each word, and output | |
an image with the words in the correct order, but slightly misaligned. | |
Usage: serialtypist.py [options] string | |
Options: | |
-h, --help show this help message and exit | |
-v, --verbose print extra information |
This file contains hidden or 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
import requests | |
import re | |
import webbrowser | |
import datetime | |
now = datetime.datetime.now() | |
year = now.year | |
month = now.month | |
months = 12 | |
years = 1 |
This file contains hidden or 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
#!/bin/bash | |
# make a backup copy of the sshd_config file | |
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak | |
# check if the first argument is "enable" or "disable" | |
if [ "$1" == "enable" ]; then | |
# enable password authentication | |
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/; s/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config | |
echo "Password authentication has been enabled" |
This file contains hidden or 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
# Backs up MisTer saves to an external host using SCP, as well as locally for good measure | |
# Create a special user on the host w/ the specific perms, and use ssh-keygen to generate a key, | |
# then ssh-copy-id -p <port> -i <key.pub> <user>@<host> | |
# don't forget to disable the password on the host after copying | |
# PLEASE NOTE that the mister has an insecure default password which may be re-enabled on update, so be sure to limit perms appropriately | |
cp -rv /media/fat/saves/* /media/fat/backups/ | |
echo "Files copied to /media/fat/backups" | |
echo "Now, trying to upload to the backup host with SCP. You may need to accept the host key if this is the first run or anything has changed." | |
scp -rv -C -i /root/<PRIVATE_SSH_KEY> -P <PORT> /media/fat/saves/* mister@<HOST_IP>:/mnt/shared/media/mister/ |
This file contains hidden or 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
/* | |
* Rater: dialog interface to add, remove, or modify WikiProject banners | |
* Author: Evad37 | |
* Licence: MIT / CC-BY 4.0 [https://github.com/evad37/rater/blob/master/LICENSE] | |
* | |
* Built from source code at GitHub repository [https://github.com/evad37/rater]. | |
* All changes should be made in the repository, otherwise they will be lost. | |
* | |
* To update this script from github, you must have a local repository set up. Then | |
* follow the instructions at [https://github.com/evad37/rater/blob/master/README.md] |
This file contains hidden or 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
import sys | |
import time | |
def get_shift(pin_char): | |
""" | |
Returns the numeric shift value for a given PIN character. | |
Digits are taken as their integer value. | |
Letters use their position in the alphabet (A=1, B=2, etc.). | |
""" | |
if pin_char.isdigit(): |
This file contains hidden or 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
# yaml - insert into home assistant configuration.yaml, then dev tab>check configuration && restart | |
sensor: | |
- platform: rest | |
name: Daily Quote | |
resource: https://zenquotes.io/api/today | |
method: GET | |
scan_interval: 86400 # Update once per day | |
value_template: "{{ value_json[0].q }}" | |
json_attributes: | |
- q |