This file contains hidden or 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
public class UpcCode | |
{ | |
public static bool IsValid(string code) | |
{ | |
if (string.IsNullOrEmpty(code)) return false; | |
if (!code.All(char.IsDigit)) return false; | |
if (code.Length < 12 || code.Length > 13) return false; | |
var digits = code.Select(c => int.Parse(c.ToString())).Reverse().Skip(1).ToArray(); | |
var checkBit = int.Parse(code.Last().ToString()); |
This file contains hidden or 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
using System.Security.Cryptography; | |
using System.Text; | |
namespace TrotenLib | |
{ | |
/// <summary> | |
/// Generate unique-enough pseudo-random identifiers where GUID is for some reason unsuitable | |
/// Explanation: https://stackoverflow.com/a/37099588/243557 | |
/// </summary> | |
public static class LUID |
This file contains hidden or 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
/** | |
* rofi -dump-theme output. | |
* Rofi version: 1.5.4 | |
**/ | |
* { | |
colorTextHighlightEmphasis: bold underline rgba ( 190, 255, 0, 100 % ); | |
colorTextDim: var(mutedPlum); | |
limeGreen: rgba ( 160, 255, 0, 100 % ); | |
colorAccent: var(limeGreen); | |
colorText: var(ivoryShadow); |
This file contains hidden or 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
[ | |
{ | |
"backcolor": "#555", | |
"name": "EGKB - the Endgame Keyboard (ANSI)", | |
"author": "Nathan Chere", | |
"radii": "11px", | |
"switchMount": "cherry", | |
"switchBrand": "cherry", | |
"switchType": "MX1A-C1xx", | |
"plate": true |
This file contains hidden or 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
"use strict"; | |
// Load plugins | |
const autoprefixer = require("autoprefixer"); | |
const browsersync = require("browser-sync").create(); | |
const cp = require("child_process"); | |
const cssnano = require("cssnano"); | |
const del = require("del"); | |
const eslint = require("gulp-eslint"); | |
const gulp = require("gulp"); |
This file contains hidden or 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
# Requires nerdfont to display correctly | |
Import-Module posh-git | |
start-sshagent | |
function Test-Administrator { | |
$user = [Security.Principal.WindowsIdentity]::GetCurrent(); | |
(New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) | |
} |
This file contains hidden or 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
for %%f in (*.mp4) do call ffmpeg -i "%%~nf.mp4" -vcodec libx264 -vf scale=-1:360 -r 12 -preset fast -acodec copy "%%~nf.360p.mp4" | |
This file contains hidden or 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
Import-Module ./common.psm1 | |
Write-Host "This is a.ps1!" | |
./b.ps1 | |
If(IsMain()){ | |
Write-Host "This is a protected part of a.ps1" | |
} |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am nathanchere on github. | |
* I am nathanchere (https://keybase.io/nathanchere) on keybase. | |
* I have a public key ASDKIp2yEyGl6wV4FmvCLhrosIbv30oF0Uo52bEZmK_koQo | |
To claim this, I am signing this object: |
This file contains hidden or 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
setx DOTNET_CLI_TELEMETRY_OPTOUT 1 |
NewerOlder