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
#!/bin/bash | |
# script to check for complete torrents in transmission folder. | |
USER=Username here | |
PASS=password here | |
PROCESSING_FOLDER="/data/completed/process" | |
CUTOFF_EPOCH=`date -d "15 days ago" +%s` | |
# use transmission-remote to get torrent list from transmission-remote list | |
# use sed to delete first / last line of output, and remove leading spaces | |
# use cut to get first field from each line | |
TORRENTLIST=`transmission-remote -n $USER:$PASS --list | sed -e '1d;$d;s/^ *//' | cut --only-delimited -d ' ' --fields=1` |
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
## my test | |
async def test_setup_platform(hass, config_entry, config): | |
await setup_platform(hass, SWITCH_DOMAIN, config) | |
entity_registry = await hass.helpers.entity_registry.async_get_registry() | |
entry = entity_registry.async_get("switch.front_door_siren") | |
assert entry | |
## conftest.py |
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
public WeakReference Reference; | |
public override void ViewDidLoad() | |
{ | |
base.ViewDidLoad(); | |
float y = 30; | |
View.BackgroundColor = UIColor.White; | |
// The image we will work with; we derive our own so we can see | |
// it get destroyed. |
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
class AsyncCommand : ICommand | |
{ | |
private readonly Func<Task> asyncAction; | |
private bool isRunning = false; | |
public bool IsRunning | |
{ | |
get { return isRunning; } | |
set | |
{ |
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
PacManManager manager = new PacManManager(ComPort.Text); | |
manager.DoCommand(PacManManager.Command.Blue); |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO.Ports; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace PacMan.Lib | |
{ |