Skip to content

Instantly share code, notes, and snippets.

View RedTahr's full-sized avatar

Allister RedTahr

  • New Zealand
View GitHub Profile
@RedTahr
RedTahr / Timer.cs
Created January 6, 2016 19:59
My copy of Montemagnos FrenchPressTimer (for those times when I want a System.Timer in Xamarin.Forms PCL)
using System;
using System.Threading;
using System.Threading.Tasks;
namespace ....Core.Control {
// https://github.com/jamesmontemagno/FrenchPressTimer/blob/master/SimpleTimerPortable/Timer.cs
internal delegate void TimerCallback(object state);
internal sealed class Timer : CancellationTokenSource, IDisposable {
public Timer(TimerCallback callback, object state, int dueTime, int period) {
@RedTahr
RedTahr / CarouselLayout.cs
Created January 6, 2016 20:01
My copy of chrisriesgo / xamarin-forms-carouselview using Montemagno's FrenchPressTimer (see gist > Timer.cs)
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
// using System.Timers;
using Xamarin.Forms;
namespace ....Core.Control
{
public class CarouselLayout : ScrollView, IDisposable
@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)
@RedTahr
RedTahr / mergeFromDevToCurrentBranch.ps1
Created January 8, 2018 19:42
powershell script to git merge dev branch with currently checked out branch
$currentBranch = git rev-parse --abbrev-ref HEAD
git checkout dev
git pull
git checkout $currentBranch
git merge dev
@RedTahr
RedTahr / README.md
Created January 31, 2018 22:29 — forked from hofmannsven/README.md
My simply Git Cheatsheet
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 / techcommunity-post.txt
Created September 26, 2018 09:07
hardening windows 10 - simple tips
...putting this here so i don't loose them.
https://techcommunity.microsoft.com/t5/Windows-10-security/Hardening-Windows-10-on-an-IT-Pro-s-laptop/td-p/180502
‎04-13-2018 04:13 PM - edited ‎04-16-2018 10:59 AM
a clean install of Windows 10 is pretty good, that said, I do have the following advice:
It is important to properly configure User Account Control on all machines; out of the box it is very insecure meaning anything can bypass it to grab admin privileges.
It is important to make sure that Secure Boot is enabled on all machines.
@RedTahr
RedTahr / top10tools.md
Created October 2, 2018 22:42
me being lazy and using gists to get a list of things from one computer to another.

taken from TinkerSec's answer on https://www.peerlyst.com/posts/pentestez-iso-creating-a-new-pentest-instance-christopher-gebhardt?trk=profile_page_overview_panel_posts#comment-65ugaE4YQaQeQXbbc

OpenVAS - http://www.openvas.org/ Vulnerability Scanner. Easy to use. Web App Based. Point and Run. Great for high level vulnerability scan. Shows common "bad things" that could be exploited by malicious hackers. Good for Asset awareness (We don't have an Apache server in our environment?! Where did that come from?) Zenmap - https://nmap.org/zenmap/ Host and Service Scanner. Good for Asset and Service Awareness.

Keybase proof

I hereby claim:

  • I am redtahr on github.
  • I am redtahr (https://keybase.io/redtahr) on keybase.
  • I have a public key ASDeSMjk2aOEDibfB2jGzmKezCVXyrh4ZTkoz-Es2zFgWQo

To claim this, I am signing this object:

@RedTahr
RedTahr / setup git commands
Created July 14, 2019 22:35
basic setup git commands that i rarely need so always forget
# https://www.git-tower.com/learn/git/faq/change-author-name-email
$ git config --global user.name "John Doe"
$ git config --global user.email "[email protected]"
or --local to set per repo
# https://help.github.com/en/articles/setting-your-commit-email-address
<username>@users.noreply.github.com