This file contains hidden or 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
| import sys | |
| sys.stdout.buffer.write(bytes([0xAA])) |
This file contains hidden or 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
| $ cat build.sh | |
| container=$(buildah from alpine) | |
| mnt=$(buildah mount $container) | |
| set -ex; mkdir -p $mnt/work; touch $mnt/work/foo | |
| container2=$(buildah from alpine) | |
| mnt2=$(buildah mount $container2) | |
| set -ex;mkdir -p $mnt2/work | |
| cp $mnt/work/foo $mnt2/work/ |
この記事は Mobility Technologies Advent Calendar 2020 の2日目の記事です。
みなさんこんにちは。tetsukayです。
株式会社Mobility Technologies でソフトウェアエンジニア(Android, Flutter)として働いています。
This Ansible guide discusses several approaches on how to set different
role default variables
based / depending on the host operating system aka ansible_distribution /
ansible_facts.distribution or other variables. For example, a role
variable image_uri should point to the latest cloud image for the host.
For CentOS 8 or Red Hat Enterprise Linux (RHEL) 8 the default value
should be:
This file contains hidden or 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
| parallel = promises => Promise.all(promises.map(p=>new Promise(done=>{try{p.then(value=>done({ok:true,value})).catch(err=>done({ok:false,err}))}catch(err){done({ok:false,err})}}))) |
This file contains hidden or 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
| from collections import defaultdict | |
| import click | |
| @click.group() | |
| @click.pass_context | |
| def cli(ctx): | |
| print('cli init') | |
| @cli.group() |
This file contains hidden or 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 bash | |
| CIPHERS='ALL:eNULL' | |
| DELAY=${2:-0.1} | |
| SERVER=${1:?usage: $0 <host:port> [delay, default is ${DELAY}s] [ciphers, default is ${CIPHERS}]} | |
| MAXLEN=$(openssl ciphers "$CIPHERS" | sed -e 's/:/\n/g' | awk '{ if ( length > L ) { L=length} }END{ print L}') | |
| echo Using $(openssl version). | |
| declare -A TLSMAP=( [tls1_1]=cipher [tls1_2]=cipher [tls1_3]=ciphersuites ) |
This file contains hidden or 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 python3 | |
| # -*- coding: utf-8 -*- | |
| # | |
| # Copyright © 2019 James Seo <james@equiv.tech> (github.com/kangtastic). | |
| # | |
| # This file is released under the WTFPL, version 2 (wtfpl.net). | |
| # | |
| # md4.py: An implementation of the MD4 hash algorithm in pure Python 3. | |
| # | |
| # Description: Zounds! Yet another rendition of pseudocode from RFC1320! |
NewerOlder