Skip to content

Instantly share code, notes, and snippets.

View RedTahr's full-sized avatar

Allister RedTahr

  • New Zealand
View GitHub Profile
@hofmannsven
hofmannsven / README.md
Last active June 17, 2024 10:34
Git CLI Cheatsheet
@hofmannsven
hofmannsven / README.md
Last active February 2, 2024 20:47
Raspberry Pi Cheatsheet
@bradjolicoeur
bradjolicoeur / gist:e77c508089aea6614af3
Created August 8, 2014 20:15
Powershell Script to Increment Build Number in AssemblyInfo.cs
#
# This script will increment the build number in an AssemblyInfo.cs file
#
$assemblyInfoPath = "C:\Data\Temp\AssemblyInfo.cs"
$contents = [System.IO.File]::ReadAllText($assemblyInfoPath)
$versionString = [RegEx]::Match($contents,"(AssemblyFileVersion\("")(?:\d+\.\d+\.\d+\.\d+)(""\))")
Write-Host ("AssemblyFileVersion: " +$versionString)
@ZevEisenberg
ZevEisenberg / resetAllSimulators.sh
Last active June 20, 2024 17:13
Reset all iOS simulators with this one weird trick
osascript -e 'tell application "iOS Simulator" to quit'
osascript -e 'tell application "Simulator" to quit'
xcrun simctl erase all

Git Cheat Sheet

Commands

Getting Started

git init

or

@chrisriesgo
chrisriesgo / CarouselViewWithVMViews.cs
Created July 12, 2015 15:37
An example showing how to have dynamic item templates driven off of the bound viewmodels.
public class App : Application
{
public IEnumerable<ICarouselViewModel> _pages;
public App()
{
_pages = new List<ICarouselViewModel>()
{
new PageOneViewModel(),
new PageTwoViewModel()
@rponte
rponte / get-latest-tag-on-git.sh
Last active May 16, 2024 06:48
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples
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():

Generating Authy passwords on other authenticators


Update 04.04.2020: Please take a look at many of the forks of this gist or comments, where people have updated or improved upon the code. I have not needed this in a long time, which is why the original document has not been updated and the code probably does not work. Stay secure and only copy and paste code that you trust.

There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes (beware, thro

@JonDouglas
JonDouglas / xamarin-android-performance.md
Last active February 28, 2024 17:44
Xamarin Android Performance

Xamarin.Android Performance Issues

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Errors is to first ensure you have the proper tooling available:

  • Diagnostic MSBuild Output Enabled(Instructions)
  • Android SDK Installed
  • Android API Level Documentation