I hereby claim:
- I am patridge on github.
- I am patridge (https://keybase.io/patridge) on keybase.
- I have a public key ASCKUpBrk6PnSerOrfBdBcjh8ZjyzZeQzEU8UP-Q2q0tago
To claim this, I am signing this object:
| // If you don't want to pull the whole [Splat](https://github.com/paulcbetts/splat) library over just for colors, | |
| // here are a couple functions to help. | |
| // Store your color values as hex-based `long`s and just convert them to native colors when you use them. | |
| // NOTE: iOS uses RGBA floats (0..1) and Android uses ARGB ints (0..255) when converting. | |
| // Usage example: | |
| SomeView.SetBackgroundColor(MyAppColors.SomeGrayHighlight.AsNative()); | |
| // Core library can hold your colors: | |
| public static class MyAppColors { |
| public static class DateTimeExtensions | |
| { | |
| static readonly DateTime Epoch = new DateTime (1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); | |
| public static string AsObjectIdPrefix (this DateTime dateTime) | |
| { | |
| var deltaSinceEpoch = dateTime - Epoch; | |
| var seconds = (int)deltaSinceEpoch.TotalSeconds; | |
| var secondsAsHex = seconds.ToString ("X").PadLeft (8, '0').ToLowerInvariant (); | |
| return secondsAsHex; | |
| } |
I hereby claim:
To claim this, I am signing this object:
| # To view any current aliases, run this: | |
| git config --get-regexp alias | |
| # `git tree` (and press Q to quit): Display a nice tree with branches. | |
| git config --global alias.tree "log --graph --decorate --pretty=oneline --abbrev-commit --all" | |
| # `git showtrackedignored`: Display normally tracked files currently being ignored. | |
| git config --global alias.showtrackedignored "ls-files -i --exclude-standard" | |
| # Push the current branch to my personal remote name choice (by default, technically configurable, but everyone should push to patridge too, apparently) | |
| alias.pushu !git push --set-upstream ${1-patridge} $(git branch --show-current) |
| # FlatRedBall (FRB) .gitignore | |
| # https://gist.github.com/patridge/46a9e6f410499e47fdbfc6d81c7c92f0/ | |
| *.Generated.cs | |
| *.csvSettings | |
| *.cachefile | |
| *.Generated.Event.cs | |
| *.gvwx | |
| *.aeproperties |
| { | |
| "Microsoft Docs image": { | |
| "prefix": [ "image", "img" ], | |
| "body": [ | |
| ":::image source=\"$1\" alt-text=\"$0\":::" | |
| ], | |
| "description": "Microsoft Docs-style image syntax (':::image …:::')." | |
| }, | |
| "Microsoft Docs decorative/icon image": { | |
| "prefix": [ "image", "img" ], |
| # Command line calls that don't fit elsewhere (e.g., PowerShell Experiments: https://github.com/patridge/PowerShellExperiments) | |
| # Check for global NPM packages with updates available | |
| npm outdated -g --depth=0 | |
| # |
| // e.g., inject something whenever iterating a list | |
| const arr = [ 1, 2, 3 ]; | |
| arr[Symbol.iterator] = function () { | |
| let i = 0; | |
| let arr = this; | |
| return { | |
| next: function () { | |
| if (i >= arr.length) { | |
| return { done: true }; | |
| } else { |
| # When GoPro recordings fill a 4GB file, they continue into additional sequential files differentiatedby the second and third characters, such as "GH010136.MP4" to "GH040136.MP4" when recording "0136" spans four files (GH01, GH02, GH03, GH04). | |
| # Group all MP4 files of that GH*.MP4 format by the recording number (last four numbers) and filter by any grouping that contains more than one file, indicating it spans multiple files. | |
| # TODO: Edit for your own FFmpeg install location | |
| $ffmpegLocation = "C:\ProgramData\chocolatey\bin\ffmpeg.exe" # Default Chocolatey install location | |
| $outputCombinedVideoSuffix = "-combined" | |
| # Get all appropriate GoPro video segments without getting any previously generated combined video files (`-Exclude`). | |
| foreach ($group in (Get-ChildItem GH*.MP4 -Exclude GH*${outputCombinedVideoSuffix}.MP4 | Group-Object -Property { $_.Name.Substring($_.Name.Length - ".MP4".Length - 4, 4) } | ? { ($_.Group | Measure-Object).Count -gt 1 })) { | |
| # The ffmpeg utility can concatenate a bunch of video |