この記事は Mobility Technologies Advent Calendar 2020 の2日目の記事です。
みなさんこんにちは。tetsukayです。
株式会社Mobility Technologies でソフトウェアエンジニア(Android, Flutter)として働いています。
$ 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:
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})}}))) |
#!/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 ) |
#!/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! |
- hosts: all | |
become: yes | |
tags: docker | |
tasks: | |
- name: docker install | |
block: | |
- name: install docker | |
yum: name=docker | |
- name: enable service (upstart) | |
service: name=docker state=started enabled=yes |
/* | |
* dropbox_ext4.c | |
* | |
* Compile like this: | |
* gcc -shared -fPIC -ldl -o libdropbox_ext4.so dropbox_ext4.c | |
* | |
* Run Dropbox like this: | |
* LD_PRELOAD=./libdropbox_ext4.so ~/.dropbox-dist/dropboxd | |
*/ | |
@echo off | |
setlocal enabledelayedexpansion | |
set ifname="ローカル エリア接続" | |
set count=0 | |
if "%1" equ "" ( | |
for /F "tokens=1,2,3,4,5 delims=," %%i in (%~dp0ipset.csv) do ( | |
set "n=00!count!" | |
echo !n:~-2! %%i %%j |