Skip to content

Instantly share code, notes, and snippets.

View westonal's full-sized avatar

Alan Evans westonal

View GitHub Profile
@polyfjord
polyfjord / batch_reconstruct.bat
Created August 3, 2025 10:51
Batch script for automated photogrammetry tracking workflow
:: ================================================================
:: BATCH SCRIPT FOR AUTOMATED PHOTOGRAMMETRY TRACKING WORKFLOW
:: By polyfjord - https://youtube.com/polyfjord
:: ================================================================
:: USAGE
:: • Double-click this .bat or run it from a command prompt.
:: • Frames are extracted, features matched, and a sparse
:: reconstruction is produced automatically.
:: • Videos that have already been processed are skipped on
:: subsequent runs.
@seachai
seachai / gist:948ed1eeafa32ce03db6685edb879f71
Last active September 8, 2025 06:22
iTerm 2 Natural Text Editing Preset
On iTerm2 - Open Preferences > Profiles > Keys > Key Mappings > Presets > Select Natural Text Editing
- You can move a word backwards using Option ⌥ + ← and a word forwards using Option ⌥ + →
- Move to the start of the line using fn + ← and to the end of the line with fn + →.
- Also you can delete a word backwards using Option ⌥ + ⌫, delete the whole line using Command ⌘ + ⌫.
If the preset doesn't appear, reinstall iTerm2. If you installed it using Homebrew + Cask:
brew cask reinstall iterm2
@davidvavra
davidvavra / NonNullAssertionDetector.kt
Created March 22, 2019 17:06
Lint check for detecting non-null assertion (!!) in your code
import com.android.tools.lint.client.api.UElementHandler
import com.android.tools.lint.detector.api.*
import org.jetbrains.uast.UElement
import org.jetbrains.uast.UPostfixExpression
class NonNullAssertionDetector : Detector(), Detector.UastScanner {
override fun getApplicableUastTypes(): List<Class<out UElement>>? {
return listOf(UPostfixExpression::class.java)
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phit
phit / gradlesigning.md
Last active May 28, 2022 08:50
Gradle Signing for Dummies
@alainperry
alainperry / NbEnLettres.groovy
Last active March 16, 2017 01:39
Code groovy plutôt sale (mais très fonctionnel) adapté de http://stackoverflow.com/a/3911987/1168698 pour convertir un montant (peut en réalité être utilisé pour tout nombre) en lettres.
Number.metaClass.formatAsCurrency { withWords = false ->
def puissances = ["", "mille", "million", "milliard", "billion", "billiard", "trillion", "trilliard"]
def dizaines = ["", "", "vingt", "trente", "quarante", "cinquante", "soixante", "soixante", "quatre-vingt", "quatre-vingt"]
def unites = ["", "un", "deux", "trois", "quatre", "cinq", "six", "sept", "huit", "neuf", "dix", "onze", "douze", "treize", "quatorze", "quinze", "seize", "dix-sept", "dix-huit", "dix-neuf"]
def chiffres = ["", ""] + unites[2..10]
def unitesEnLettres = { nombre ->
// débrayage immédiat pour 80, ce qui simplifie le code ensuite
if (nombre == 80)
return dizaines[8] + 's'

Keybase proof

I hereby claim:

  • I am diafygi on github.
  • I am diafygi (https://keybase.io/diafygi) on keybase.
  • I have a public key whose fingerprint is F75B E4E6 EF6E 9DD2 0367 9E94 E7F6 FAD1 72EF EE3D

To claim this, I am signing this object:

@diafygi
diafygi / LICENSE.txt
Last active July 24, 2025 01:05 — forked from 140bytes/LICENSE.txt
Base58 Encoder/Decoder - slightly over 140 bytes, but still pretty useful
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@dmarcato
dmarcato / strip_play_services.gradle
Last active December 21, 2022 10:10
Gradle task to strip unused packages on Google Play Services library
def toCamelCase(String string) {
String result = ""
string.findAll("[^\\W]+") { String word ->
result += word.capitalize()
}
return result
}
afterEvaluate { project ->
Configuration runtimeConfiguration = project.configurations.getByName('compile')
@almozavr
almozavr / app_build.gradle
Created June 26, 2014 08:13
Workaround to bypass library's BuildConfig.DEBUG (always true, always release build type) via custom variable
// Application
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion