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/sh | |
# Script to route traffic from home network through VPN selectively. | |
# Based off the discussion at http://www.smallnetbuilder.com/forums/showthread.php?t=9311 | |
# The setup is a Roku box, a Home PC running Plex, and a Synology NAS with a torrent client running a web interface. | |
# The aim is to have all traffic from Roku go through the VPN, all traffic from the Home PC (and all other devices) bypassing the VPN, | |
# and the Synology NAS using the VPN. There are however some exceptions. Since Plex uses port 32400, Roku has to bypass the VPN when | |
# using that port. In addition, port 9091 has to bypass the VPN as well in order to access the Synology torrent client. | |
# | |
# Requirements: Asuswrt-Merlin with OpenVPN already set up |
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
Test file |
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
let initialMode = 0 | |
let countdownMode = 100 | |
let cheatedMode = 200 | |
let playingMode = 300 | |
let finishedMode = 400 | |
let p1Wins = false | |
let randomTime = 0 | |
let gameStartTime = 0 | |
let activeMode = initialMode |
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
control.onEvent(EventBusSource.MICROBIT_ID_BUTTON_AB, EventBusValue.MICROBIT_BUTTON_EVT_CLICK, function () { | |
if (Button_B_state == 1) { | |
Button_B_state = 0 | |
setNose() | |
} else { | |
Button_B_state = 1 | |
setNose() | |
} | |
radio.sendValue("Lights", Button_B_state) | |
}) |
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
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#script | |
# https://en.wikipedia.org/wiki/YAML | |
# https://stackoverflow.com/questions/55657444/how-to-run-different-steps-in-a-yml-file-depending-on-the-branch-trigger | |
trigger: | |
batch: true | |
branches: | |
include: | |
- master | |
- develop |
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
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright | |
notice, this list of conditions and the following disclaimer in the | |
documentation and/or other materials provided with the distribution. | |
* Neither the name of the <organization> nor the | |
names of its contributors may be used to endorse or promote products |
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
let initialMode = 0 | |
let countdownMode = 100 | |
let cheatedMode = 200 | |
let playingMode = 300 | |
let finishedMode = 400 | |
let soundDuration = 300 | |
let p1Wins = false | |
let randomTime = 0 | |
let gameStartTime = 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
input.onButtonPressed(Button.A, function () { | |
maxb = maxb <= 0 ? 0 : Math.max(maxb - 10,0) | |
}) | |
input.onButtonPressed(Button.B, function () { | |
maxb = maxb >= 255 ? 255 : Math.min(maxb + 10,255) | |
}) | |
input.onLogoEvent(TouchButtonEvent.Pressed, function() { | |
reverse = !reverse |
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
// Rotating Rainbow for GlowBit Rainbow and Micro:Bit (https://core-electronics.com.au/glowbit-rainbow.html) | |
// Can run with https://makecode.microbit.org | |
// Nb: You must import 'neopixel' extension into makecode before running | |
input.onButtonPressed(Button.A, function () { | |
maxb = maxb <= 0 ? 0 : Math.max(maxb - 10,0) | |
}) | |
input.onButtonPressed(Button.B, function () { | |
maxb = maxb >= 255 ? 255 : Math.min(maxb + 10,255) |