Skip to content

Instantly share code, notes, and snippets.

View FrankSansC's full-sized avatar
🤔
Seeking the next exciting challenge

Frank FrankSansC

🤔
Seeking the next exciting challenge
View GitHub Profile
#!/usr/bin/env bash
set -e
set -u
OP_RELEASE_NOTES_URL="https://app-updates.agilebits.com/product_history/CLI"
OP_PLATFORM="linux"
OP_ARCH="amd64"

Shell environment detection

For now, those methods should work on both Bash and ZSH. I am planning on adding a compatibility matrix, but this might require shifting away from markdown. See specific-shells-notes.md .

Reminders:

[[ -z $VAR ]]: Return 0 (true) if string is nonzero
*: Any number of any character. See shell globbing
warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
# This library is deprecated and unmaintained. It is included for
# compatibility with Perl 4 scripts which may use it, but it will be
# removed in a future version of Perl. Please use the File::Find module
# instead.
# Usage:
# require "find.pl";
#
// From Joseph Yiu, minor edits by FVH
// hard fault handler in C,
// with stack frame location as input parameter
// called from HardFault_Handler in file xxx.s
void hard_fault_handler_c (unsigned int * hardfault_args)
{
unsigned int stacked_r0;
unsigned int stacked_r1;
unsigned int stacked_r2;
unsigned int stacked_r3;