Skip to content

Instantly share code, notes, and snippets.

View RedTahr's full-sized avatar

Allister RedTahr

  • New Zealand
View GitHub Profile
from gpiozero import LED, MotionSensor, LightSensor
from signal import pause
pir = MotionSensor(21)
ldr = LightSensor(26)
light = LED(25)
def daytime():
pir.when_motion = None
pir.when_no_motion = None
light.off()
def nighttime():
@RedTahr
RedTahr / README.md
Created January 31, 2018 22:29 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@RedTahr
RedTahr / versionincrement.ps1
Last active December 17, 2018 17:31 — forked from bradjolicoeur/gist:e77c508089aea6614af3
Powershell Script to Increment Build Number in AssemblyInfo.cs
#
# This script will increment the build number in a file
# refactored from the AssemblyInfo.cs version incrementing gist for use with AndroidManifest.xml
#
#$assemblyInfoPath = "C:\Data\Temp\AssemblyInfo.cs"
$mani = "C:\Data\Temp\AndroidManifest.xml"
#$contents = Get-Content $assemblyInfoPath # looses file formatting
$contents = [System.IO.File]::ReadAllText($mani)