I hereby claim:
- I am jonathanduke on github.
- I am jonathanduke (https://keybase.io/jonathanduke) on keybase.
- I have a public key whose fingerprint is 0AF9 932B 0F4F 2ED1 8B7A 01E4 25C1 F8BD 1D9E 81CD
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<!-- | |
Based on: https://gist.github.com/jonathanduke/ab4fc1880e8b245d3f939b122f301938#file-buildassemblyinfo-targets | |
Dependent on: https://gist.github.com/jonathanduke/ab4fc1880e8b245d3f939b122f301938#file-gitbuildprops-targets | |
Public domain: http://unlicense.org/ | |
Modify as you wish, but you are encouraged to leave this comment for future reference in case the original is updated. | |
--> | |
<Project> | |
<Import Project="GitBuildProps.targets" /> |
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Based on: https://gist.github.com/jonathanduke/27f440de0ddb764b88194771be4564e8#file-driveimagexmlattrib-xsl | |
Applies to: https://www.runtime.org/driveimage-xml.htm | |
Public domain: http://unlicense.org/ | |
Modify as you wish, but you are encouraged to leave this comment for future reference in case the original is updated. | |
--> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="text" /> | |
<xsl:template match="/"> |
### | |
## Based on: https://gist.github.com/jonathanduke/020d97409396e784a2db84f178c8b907#file-git-squash-history-sh | |
## Public domain: http://unlicense.org/ | |
## Modify as you wish, but you are encouraged to leave this comment for future reference in case the original is updated. | |
### | |
# Use at your own risk! To make sure you know what you're doing, "origin" and "master" have been replaced with different names. | |
git checkout -B TEMPhead | |
git worktree add --checkout -B TEMPstart _TEMPworktree TEMPhead~30 # goes back 30 commits (or manually specify your own branch) | |
cd _TEMPworktree |
Abstract. Suppose an author has created a document that he wants to publish anonymously, but at some point in the future he would like to have the option to prove both his identity and the time of creation. A digital signature can be used to sign the document's content, but there is no mechanism to prevent another person from spoofing the timestamp and signing their own version of the document to claim they are the original author. Using a public, permanent blockchain such as bitcoin could allow the author to augment the digital signature with a timestamp that could be proven to match the document signature. The signature and timestamp could be stored privately until the author wishes to claim ownership at a later date. This might be compared to a privately-held NFT.
Will anyone ever prove the identity of [Satoshi Nakamoto](https
// read a DD-WRT nvrambak_xyz.bin backup file and create "nvram set" commands FOR COMPARISON ONLY | |
// NOTE: some values may have issues, so you can't just copy and paste the whole output or it can mess up your router | |
// The format should be similar to processes to export from the router via the command line: | |
// https://gist.github.com/Aikhjarto/5b1c6b5e5d373d8d60c004e075b29acc | |
// https://gist.github.com/rambotech/d1e2486228c5e972c3c9c8936920f2fc | |
var set = new List<string>(); | |
using var file = System.IO.File.OpenRead(args[0]); | |
var buffer = new byte[0xFFFF]; | |
int len = 6; | |
int count = file.Read(buffer, 0, len); |
:::: | |
:: Original source: https://gist.github.com/jonathanduke/92eac20fe8a85eff8e8840b5d56551f9#file-git-list-worktrees-bat | |
:: Public domain: http://unlicense.org/ | |
:: Modify as you wish, but you are encouraged to leave this comment for future reference in case the original is updated. | |
:::: | |
@echo off | |
setlocal EnableDelayedExpansion | |
for /f "tokens=*" %%f in ('dir /a /s /b .git') do ( | |
if exist "%%f\*" ( | |
set "_dir=%%~dpf" |
// https://dartpad.dev/?id=dad879af094b27b24fd6070e1175e791 | |
// Pending feature request: https://github.com/dart-lang/sdk/issues/41717 | |
// Note: this requires Dart 2.14 and above (to support the >>> operator) | |
class IntRange { | |
// based on: https://stackoverflow.com/a/75928881 | |
static const int maxValue = (-1 >>> 1); | |
static const int minValue = -1 - maxValue; | |
} |
# This is for converting a ripped movie to a 480p size so my kids can watch it on their tablets in the car. | |
# I'm cropping off 276 pixels from the top and bottom, which means it's a 3840x2160 image with a 2.39:1 letterboxed video. | |
# The width can vary based on the aspect ratio, but the height should always be 480px. | |
# I'm hard-coding it to use H.264 and yuv420p and to downmix surround sound to regular stereo channels. | |
# On some movies, I had to use -map 0:2 to get the 5.1 audio stream if the 7.1 was truehd and ffmpeg didn't like that. | |
ffmpeg -i "4k.mkv" -vf "crop=iw:ih-552:0:276,scale=1146:480" -c:v libx264 -c:a copy -ac 2 -sn -pix_fmt yuv420p -map 0:0 -map 0:2 -crf 18 -map_chapters -1 "480p.mp4" | |
# After getting the resolution right, follow this process to reduce the size of the video: https://trac.ffmpeg.org/wiki/Encode/H.264#twopass | |
ffmpeg -y -i original.mp4 -c:v libx264 -b:v 1000k -pass 1 -an -f null NULL && ffmpeg -i original.mp4 -c:v libx264 -b:v 1000k -pass 2 -c:a aac -b:a 128k shrink.mp4 |
import 'package:flutter/material.dart'; | |
extension LocaleFallbackExtensions on Locale { | |
/// Look up the most specific version of a localized string, falling back through the BCP 47 language-script-region hierarchy. | |
String? getString(String? key, String? Function(String k) lookup) { | |
final prefix = key != null ? '${key}_' : ""; | |
String? text; | |
if (null != (text = lookup('$prefix${toString()}'))) { | |
// full locale code (en_US, es_MX, fr_CA, zh_Hans_CN, zh_Hant_TW) |