The recent post on Hacker News about #! semantics surprised me. I had always assumed that a shebang line like
#! /usr/bin/prog -a -b
Would be equivalent to calling
$ /usr/bin/prog -a -b <file>
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
The recent post on Hacker News about #! semantics surprised me. I had always assumed that a shebang line like
#! /usr/bin/prog -a -b
Would be equivalent to calling
$ /usr/bin/prog -a -b <file>
#!/bin/bash | |
# | |
# This script requires xpath to parse part of the dnscurl.pl output | |
# on CentOS/RedHat/Amazon Linux: | |
# | |
# sudo yum install perl-XML-XPath | |
# | |
# also, dnscurl.pl (from http://aws.amazon.com/code/Amazon-Route-53/9706686376855511) | |
# expects your secrets to be in ~/.aws-secrets | |
# using a file format like this (from http://dmz.us/wp/wp-content/uploads/r53/aws-secrets.txt) |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
#!/bin/bash | |
# Requires cli53 to be installed | |
# https://github.com/barnybug/cli53 | |
DNS_NAME="home"; | |
DNS_ZONE="example.com"; | |
export AWS_ACCESS_KEY_ID= | |
export AWS_SECRET_ACCESS_KEY= |
#!/bin/bash | |
mkdir /tmp/magick_tmp | |
MAGICK_TMPDIR=/tmp/magick_tmp | |
export MAGICK_TMPDIR | |
LECTURENOTESDIR=/home/ec2-user/Dropbox/LectureNotes/ | |
cd $LECTURENOTESDIR | |
process_directory() { |
#!/bin/bash | |
# exit on error | |
set -e | |
# Description: | |
# - Linux-compatible alternative to the official Bing Wallpaper client (https://www.microsoft.com/en-us/bing/bing-wallpaper). | |
# - Downloads the current Bing wallpaper of the day directly. | |
# - Fetches the matching image description / copyright information and overlays it onto the image using ImageMagick. | |
# |
Exporting password + one-time code data from iCloud Keychain is now officially supported in macOS Monterey and Safari 15 (for Monterey, Big Sur, and Catalina). You can access it in the Password Manager’s “gear” icon (System Preferences > Passwords on Monterey, and Safari > Passwords everywhere else), or via the File > Export > Passwords... menu item). You shouldn't need to hack up your own exporter anymore.
After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.
// Copyright 2016 Jeremie Miserez <[email protected]> | |
// | |
// MIT License | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF O |
1. Go to https://gchq.github.io/CyberChef/ | |
2. Download CyberChef (top left), extract .zip and open .html file | |
3. Click "Load Recipe" in the top middle | |
4. Enter the following recipe: | |
Parse_QR_Code(false) | |
Regular_expression('User defined','otpauth-migration\\:\\/\\/offline\\?data\\=(.*)',true,false,true,false,false,false,'List capture groups') | |
URL_Decode() | |
From_Base64('A-Za-z0-9+/=',true) | |
Protobuf_Decode('syntax = "proto3";\n\noption java_package = "com.beemdevelopment.aegis";\noption java_outer_classname = "GoogleAuthProtos";\n\nmessage MigrationPayload {\n enum Algorithm {\n ALGORITHM_UNSPECIFIED = 0;\n ALGORITHM_SHA1 = 1;\n ALGORITHM_SHA256 = 2;\n ALGORITHM_SHA512 = 3;\n ALGORITHM_MD5 = 4;\n }\n\n enum DigitCount {\n DIGIT_COUNT_UNSPECIFIED = 0;\n DIGIT_COUNT_SIX = 1;\n DIGIT_COUNT_EIGHT = 2;\n }\n\n enum OtpType {\n OTP_TYPE_UNSPECIFIED = 0;\n OTP_TYPE_HOTP = 1;\n OTP_TYPE_TOTP = 2;\n }\n\n message OtpParameters {\n bytes secret = 1;\n string name = 2;\n str |