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 datetime | |
| import transmissionrpc | |
| from config import TRANSMISSION | |
| daemon = transmissionrpc.Client( | |
| address=TRANSMISSION.server, | |
| port=TRANSMISSION.port, | |
| user=TRANSMISSION.user, | |
| password=TRANSMISSION.password) |
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
| <?php | |
| $data = 'blah'; | |
| $data = hex2bin($data); | |
| header('Content-Type: image/png'); | |
| imagepng(imagecreatefromstring($data)); | |
| ?> |
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
| <IfModule mod_ssl.c> | |
| <VirtualHost *:443> | |
| ServerName osto.us | |
| ServerAlias osto.us | |
| <Proxy *> | |
| Order deny,allow | |
| Allow from all | |
| </Proxy> |
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 threading | |
| import time | |
| from selenium import webdriver | |
| TOTAL_WORKERS = 10 | |
| TWITTER_USER = 'butts' | |
| TWITTER_PASSWORD = 'bu77s' | |
| def worker(): |
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
| ls parent-dir/ | xargs -I{} -n 1 cp my-cool-file.tgz parent-dir/{}/ |
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
| #!/usr/bin/env bash | |
| if ! [[ $1 =~ ^-?[0-9]+$ ]]; then | |
| echo "Percentage must be an integer" 1>&2 | |
| exit 1 | |
| fi | |
| if (( $1 < 0 || $1 > 100 )); then | |
| echo "Percentage value must be at least 0 or at most 100" 1>&2 | |
| exit 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
| #!/usr/bin/env bash | |
| ###################################################################### | |
| # # | |
| # da config zone # | |
| # # | |
| ###################################################################### | |
| # where to put all the converted files, relative to where this script lives | |
| OUTPUT_DIR="output-dir" |
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
| version: '2' | |
| services: | |
| homeassistant: | |
| container_name: home-assistant | |
| image: homeassistant/home-assistant:stable | |
| volumes: | |
| - /opt/home-assistant/config:/config | |
| devices: | |
| - /dev/ttyUSB1:/dev/ttyUSB1 | |
| environment: |
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
| [Unit] | |
| Description=Home Assistant service | |
| Requires=docker.service | |
| After=docker.service | |
| [Service] | |
| Restart=always | |
| User=hassio | |
| Group=hassio |