I hereby claim:
- I am jmiserez on github.
- I am jmiserez (https://keybase.io/jmiserez) on keybase.
- I have a public key ASB1Z3r-6WbG1JJ12os9xUuXhFMe5QElabQLKWD_M29nPQo
To claim this, I am signing this object:
| How to parse Google Authenticator "Transfer Account" QR codes: | |
| ============================================================== | |
| This method supports multi-account exports as well as single-account exports / QR codes. | |
| Changelog: | |
| =========== | |
| 2025-08-06: updated for multi-account exports | |
| 2023-08-11: added notes on security | |
| IMPORTANT: |
| # Bookmarklet on one line: | |
| javascript:(function(){var x=0;var y=0;var overlay=document.createElement('div');Object.assign(overlay.style,{position:'fixed',top:0,left:0,width:'100vw',height:'100vh',zIndex:99999999,background:'transparent',cursor:'crosshair'});document.body.append(overlay);overlay.addEventListener('click',function(event){Object.assign(overlay.style,{width:0,height:0});x= event.clientX;y=event.clientY; var element=document.elementFromPoint(x,y);var position=element.getBoundingClientRect();Object.assign(overlay.style,{background:'rgba(0,128,255,0.25)',outline:'1px solid rgba(0,128,255,0.5)',top:''+position.top+'px',left:''+position.left+'px',width:''+position.width+'px',height:''+position.height+'px'});setTimeout(function(){var ev1=new MouseEvent("mousedown",{bubbles:true,cancelable:false,view:window,button:2,buttons:2,clientX:x,clientY:y});element.dispatchEvent(ev1);var ev2=new MouseEvent("mouseup",{bubbles:true,cancelable:false,view:window,button:2,buttons:0,clientX:x,clientY:y});element.dispatc |
| # Add this to your Cygwin or WSL Ubuntu .bashrc | |
| # Args: | |
| # - process name | |
| # - optional: commandline (use '%' as wildcards) | |
| # Example: suspendps name commandline | |
| # - suspendps notepad.exe %mytextfile.txt% | |
| # - resumeps notepad.exe | |
| # Note: pssuspend64.exe must be installed and available (https://docs.microsoft.com/en-us/sysinternals/downloads/pssuspend) | |
| getwin32processid() { | |
| # WSL / Windows 10 suitable version without spawning a shell |
| # Add this to your .bashrc and source it (source ~/.bashrc) | |
| # Example: forallsubdirs basedir commands | |
| # - forallsubdirs . "ls | wc -l; git status" | |
| # - forallsubdirs . "git fetch --all; git merge --ff-only" | |
| # Note: | |
| # - To include hidden directories (starting with a "."), set the dotglob option in Bash: shopt -s dotglob | |
| # - Silencing job control (see comments) is only partially possible, in certain cases job control output will still be printed (see https://stackoverflow.com/a/38278291/202504). | |
| forallsubdirs() { | |
| if [ -d "$1" ]; then | |
| dir="$1" |
| { | |
| "1":{ | |
| "default":{}, | |
| "journalArticle":{ | |
| "field":"series", | |
| "operations":[ | |
| { | |
| "function":"replace", | |
| "regex":"\\W", | |
| "replacement":"", |
| #!/bin/bash | |
| # Make default camera /dev/video0 point to the "best" camera present. | |
| # Source: Jason Eisner http://askubuntu.com/a/520857/145754 | |
| # on question http://askubuntu.com/questions/396952/how-to-change-the-default-webcam-changing-dfaults-in-multimedia-selctor-not-wor | |
| setdefaultwebcam() { | |
| if [ -h /dev/video0 ]; then | |
| sudo rm /dev/video0 # not first run: remove our old symlink | |
| elif [ -e /dev/video0 ]; then | |
| sudo mv /dev/video0 /dev/video0.original # first run: rename original video0 |
I hereby claim:
To claim this, I am signing this object:
| /* | |
| * vm.c - Simple X86 interpreter | |
| * | |
| * Copyright (c) 2013, Jeremie Miserez <[email protected]> | |
| */ | |
| /* | |
| * Highlights/Features not specified in assignment | |
| * =============================================== | |
| * - Memory simulation of all 4GB with paging |
| #!/bin/bash | |
| # | |
| # xenvm_decrypt_backup.sh | |
| # | |
| # Author: Jeremie Miserez <[email protected]> | |
| # Latest version: https://gist.github.com/jmiserez/11a8aafeee9256645ac5 | |
| # | |
| # This script will decrypt encrypted images generated by xenvm_backup_encrypted.sh, | |
| # (https://gist.github.com/jmiserez/f7771d0c82455128839d), when given a .key.enc file | |
| # and if all related files are in the same directory as the .key.enc file. |
| #!/bin/bash | |
| # | |
| # xenvm_backup_encrypted.sh | |
| # | |
| # Author: Jeremie Miserez <[email protected]> | |
| # Latest version: https://gist.github.com/jmiserez/f7771d0c82455128839d | |
| # | |
| # This script will: | |
| # 1. Connect to a remote XenServer server over SSH | |
| # 2. Shutdown the specified VM |