- Write to a SD card on the existing linux machine
# pacman -Syu dosfstools # cfdisk /dev/sdb # mkfs.vfat /dev/sdb1 # mkfs.ext4 /dev/sdb2 # mount /dev/sdb2 /mnt # mkdir /mnt/boot # mount /dev/sdb1 /mnt/boot # wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz #see https://archlinuxarm.org/about/downloads
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
| OpenSSH_8.0p1, OpenSSL 1.1.1b 26 Feb 2019 | |
| debug1: Reading configuration data /home/rsp9u/.ssh/config | |
| debug1: /home/rsp9u/.ssh/config line 1: Applying options for raspi | |
| debug1: Reading configuration data /etc/ssh/ssh_config | |
| debug2: resolve_canonicalize: hostname 192.168.63.10 is address | |
| debug2: ssh_connect_direct | |
| debug1: Connecting to 192.168.63.10 [192.168.63.10] port 50022. | |
| debug1: Connection established. | |
| debug1: identity file /home/rsp9u/.ssh/id_rsa type 0 | |
| debug1: identity file /home/rsp9u/.ssh/id_rsa-cert type -1 |
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 | |
| import string | |
| import random | |
| if len(sys.argv) >= 2: | |
| pwlen = int(sys.argv[1]) | |
| else: | |
| pwlen = 16 | |
| print("".join(random.choices(string.ascii_letters + string.digits + string.punctuation, k=pwlen))) |
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
| $ ./stdin_mode.sh | |
| ISCHR | |
| $ cat a_file | ./stdin_mode.sh | |
| ISFIFO | |
| $ ./stdin_mode.sh < a_file | |
| ISREG |
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 cypress/base:10 | |
| RUN apt-get update && \ | |
| apt-get install -y locales fonts-takao-gothic fonts-takao-mincho && \ | |
| apt-get clean && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN echo "ja_JP UTF-8" > /etc/locale.gen && \ | |
| locale-gen && \ | |
| update-locale LANG=ja_JP.UTF-8 && \ | |
| update-locale LANGUAGE="ja_JP:ja" && \ | |
| dpkg-reconfigure --frontend nointeractive locales && \ |
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
| fzf-select-history() { | |
| HISTNO=$(history | fzf +m --tac | sed -e 's/^\s*\([[:digit:]]\+\)\s\+.*$/\1/') | |
| zle reset-prompt | |
| } | |
| zle -N fzf-select-history | |
| bindkey '^r' fzf-select-history |
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
| template <template <typename> typename F, typename T> | |
| F<T> deco(T func) { | |
| return F<T>(func); | |
| } |
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
| #!/bin/sh | |
| if [ "$1" = "random.js" ]; then | |
| state=$(docker run --rm -v $PWD/random.js:/src/random.js -w /src node:12-alpine sh -c "yarn add uuid && node random.js" | tail -n1) | |
| nonce=$(docker run --rm -v $PWD/random.js:/src/random.js -w /src node:12-alpine sh -c "yarn add uuid && node random.js" | tail -n1) | |
| else | |
| state=$(uuidgen) | |
| nonce=$(uuidgen) | |
| fi | |
| ret=$(curl "http://localhost:4444/oauth2/auth?client_id=my-client&response_type=token&state=$state&nonce=$nonce&scope=openid" -i 2>/dev/null) |
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
| #!/bin/sh | |
| export FILTER_BRANCH_SQUELCH_WARNING=1 | |
| timediff=$(( $(date -d "2019/11/30 18:28:46" +%s) - $(date -d "Wed Nov 27 08:16:58 2019" +%s) )) | |
| for commit_hash in $(git log --pretty=oneline --author=$1 | cut -d" " -f1); do | |
| git log -n1 $commit_hash --pretty=fuller | |
| author_fixed=$(date -d @"$(( $(date -d "$(git log $commit_hash -n1 --pretty=fuller | grep AuthorDate | cut -d: -f2- | rev | cut -d" " -f2- | rev)" +%s) + $timediff ))" +%s) | |
| commit_fixed=$(date -d @"$(( $(date -d "$(git log $commit_hash -n1 --pretty=fuller | grep CommitDate | cut -d: -f2- | rev | cut -d" " -f2- | rev)" +%s) + $timediff ))" +%s) | |
| echo "author: " $(date -d @"$author_fixed") |
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
| package pumlencode | |
| import ( | |
| "bytes" | |
| "compress/zlib" | |
| "encoding/base64" | |
| ) | |
| func makeTable() map[rune]rune { | |
| src := []rune{} |
OlderNewer