Skip to content

Instantly share code, notes, and snippets.

View emaballarin's full-sized avatar
🤓
Trying to make 💻 more like 🧠!

Emanuele Ballarin emaballarin

🤓
Trying to make 💻 more like 🧠!
View GitHub Profile
@emaballarin
emaballarin / keybase.md
Created March 27, 2020 00:34
Identity verification of GitHub profile for: https://keybase.io/emaballarin

Keybase proof

I hereby claim:

  • I am emaballarin on github.
  • I am emaballarin (https://keybase.io/emaballarin) on keybase.
  • I have a public key whose fingerprint is 73C8 A680 ACC8 C617 C1F9 4B8B 0BD3 40E9 4661 54CD

To claim this, I am signing this object:

def reverse_dict(d):
return {lhs: [_ for _ in d.keys() if (lhs in d.get(_))] for lhs in set().union(*(d.values()))}
@emaballarin
emaballarin / win11_reset_titlebar_text.reg
Created November 24, 2021 14:04
Reset titlebar font face/size to Windows 11 defaults, as to revert a somehow common effect of StartAllBack / Stardock Start11 (and the like) tools
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics]
"CaptionFont"=hex:f4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,\
00,00,00,01,00,00,05,00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"CaptionHeight"="-330"
"CaptionWidth"="-330"
@emaballarin
emaballarin / config
Last active April 9, 2023 23:39
Simple .git/config for multiple remotes (e.g. sourcehut/github)
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "sh"]
url = [email protected]:~emaballarin/__REPO_NAME__
fetch = +refs/heads/*:refs/remotes/sh/*
pushurl = [email protected]:~emaballarin/__REPO_NAME__
@emaballarin
emaballarin / shutdownf.bat
Created August 25, 2022 21:46
Induce a full shutdown in Windows 10/11 systems
@echo off
shutdown /s /f /t 0
sudo update-alternatives --install "/usr/bin/jar" "jar" "__JDK__PATH__/bin/jar" 200
sudo update-alternatives --install "/usr/bin/jarsigner" "jarsigner" "__JDK__PATH__/bin/jarsigner" 200
sudo update-alternatives --install "/usr/bin/javac" "javac" "__JDK__PATH__/bin/javac" 200
sudo update-alternatives --install "/usr/bin/javadoc" "javadoc" "__JDK__PATH__/bin/javadoc" 200
sudo update-alternatives --install "/usr/bin/javap" "javap" "__JDK__PATH__/bin/javap" 200
sudo update-alternatives --install "/usr/bin/jcmd" "jcmd" "__JDK__PATH__/bin/jcmd" 200
sudo update-alternatives --install "/usr/bin/java" "java" "__JDK__PATH__/bin/java" 200
sudo update-alternatives --install "/usr/bin/jconsole" "jconsole" "__JDK__PATH__/bin/jconsole" 200
sudo update-alternatives --install "/usr/bin/jdb" "jdb" "__JDK__PATH__/bin/jdb" 200
sudo update-alternatives --install "/usr/bin/jdeprscan" "jdeprscan" "__JDK__PATH__/bin/jdeprscan" 200
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-__VERSION.SUBVERSION__ 200 \
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-__VERSION.SUBVERSION__ \
--slave /usr/bin/clang-cpp clang-cpp /usr/bin/clang-cpp-__VERSION.SUBVERSION__ \
--slave /usr/bin/clang-query clang-query /usr/bin/clang-query-__VERSION.SUBVERSION__ \
--slave /usr/bin/clang-format clang-format /usr/bin/clang-format-__VERSION.SUBVERSION__ \
--slave /usr/bin/clang-rename clang-rename /usr/bin/clang-rename-__VERSION.SUBVERSION__ \
--slave /usr/bin/clang-apply-replacements clang-apply-replacements /usr/bin/clang-apply-replacements-__VERSION.SUBVERSION__ \
--slave /usr/bin/clang-format-diff clang-format-diff /usr/bin/clang-format-diff-__VERSION.SUBVERSION__ \
--slave /usr/bin/clang-reorder-fields clang-reorder-fields /usr/bin/clang-reorder-fields-__VERSION.SUBVERSION__ \
--slave /usr/bin/clang-cl clang-cl /usr/bin/clang-cl-__VERSION.SUBVERSION__ \
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
@emaballarin
emaballarin / anglib_improved.f90
Created September 23, 2022 16:04
Angular momentum coupling coefficients for Q.M., in Fortran 9x
! anglib.f90: Angular momentum coupling coefficients for Q.M., in Fortran 9x
! Copyright (C) 1998 Paul Stevenson (idea, mainline code)
! 2018 Emanuele Ballarin (optimizations, porting)
!
! This library is free software. You can redistribute it and/or modify it
! under the terms of the GNU Lesser General Public License as published by
! the Free Software Foundation, either version 3, or (at your option) any
! later version.
!
! This library is distributed in the hope that it could be useful, but WITHOUT
@emaballarin
emaballarin / _ephemeral_gpg_setup_.txt
Created September 23, 2022 22:47
Configuration files to ephemerally set up gpg2 (e.g. for generation of keys to be moved to a secure element, or from a live CD)
Configuration files to ephemerally set up gpg2 (e.g. for generation of keys to be moved to a secure element, or from a live CD)