It happens that there are many standards for storing cryptography materials (key, certificate, ...) and it isn't always obvious to know which standard is used by just looking at file name extension or file content. There are bunch of questions on stackoverflow asking about how to convert from PEM to PKCS#8 or PKCS#12, while many tried to answer the questions, those answers may not help because the correct answer depends on the content inside the PEM file. That is, a PEM file can contain many different things, such as an X509 certificate, a PKCS#1 or PKCS#8 private key. The worst-case scenario is that someone just store a non-PEM content in "something.pem" file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform providers lock \ | |
-platform=windows_amd64 \ | |
-platform=darwin_amd64 \ | |
-platform=linux_amd64 \ | |
-platform=darwin_arm64 \ | |
-platform=linux_arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
usage () { | |
cat <<DOCUMENTATIONXX | |
Usage : . $0 ROLE_ARN [PARENT_PROFILE_NAME] | |
^--- Note that this script must be sourced not executed | |
This tool will generate temporary credentials for an assumed role, save | |
those ephemeral credentials in the awscli config and set the alias of | |
"aaws" to use this new ephemeral awscli profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle | |
gpg --quiet --with-fingerprint /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle | |
echo <<EOF >/etc/yum.repos.d/ol7-temp.repo | |
[ol7_latest] | |
name=Oracle Linux $releasever Latest ($basearch) | |
baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/latest/$basearch/ | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle | |
gpgcheck=1 | |
enabled=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl "http://gravatar.com/avatar/$(md5 -q -s myemail@example.com)" > avatar.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ # Install dnsmasq | |
$ brew update && brew install dnsmasq | |
$ # Edit dnsmasq config, paste contents | |
$ mkdir -p /usr/local/etc && vim /usr/local/etc/dnsmasq.conf | |
$ # Start dnsmasq (it will restart at startup) | |
$ sudo brew services start dnsmasq | |
==> Successfully started `dnsmasq` (label: homebrew.mxcl.dnsmasq) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_support/concern' | |
require 'active_support/callbacks' | |
module ActiveSupport | |
module Testing | |
module SetupAndTeardown | |
module ForClassicTestUnit | |
# This redefinition is unfortunate but test/unit shows us no alternative. | |
# Doubly unfortunate: hax to support Mocha's hax. | |
def run(result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git ls-files path/to/something --error-unmatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
## | |
# Solution for http://www.ancientcityruby.com/snake_case/ | |
# | |
# How many different paths could I take from the northwest corner to the | |
# southeast corner of a rectangular grid, only ever moving south or east? | |
# | |
# Usage: ./snake_case.rb <size | |
# ./snake_case.rb <length> <width> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +adamdunson is my blockchain ID. https://onename.com/adamdunson |
NewerOlder