システムの稼動中などに,一時的にスワップ領域を確保したい場合などにスワップファイルを作成します。そして,作成したファイルをスワップ領域に追加をします。
コマンドオプションの「of」にファイルのパスを指定して「bs」に基準となる容量の単位を指定して「count」にbsの量を指定します。
# dd if=/dev/zero of=作成するファイル名 bs=ブロックサイズ(byte) count=ブロック数| import requests | |
| from tqdm import tqdm | |
| def download(url: str, fname: str, chunk_size=1024): | |
| resp = requests.get(url, stream=True) | |
| total = int(resp.headers.get('content-length', 0)) | |
| with open(fname, 'wb') as file, tqdm( | |
| desc=fname, | |
| total=total, |
| #!/bin/bash | |
| # | |
| # Script for installing x11vnc on Steam Deck. | |
| # | |
| # Install: | |
| # | |
| # sh -c "$(curl -fsSL https://gist.githubusercontent.com/x43x61x69/9a5a231a25426e8a2cc0f7c24cfdaed9/raw/vnc_install.sh?$RANDOM)" | |
| # | |
| # This will modify root filesystem so it will probably get | |
| # overwrite on system updates but is totally ok executing |
| #!/usr/bin/env python | |
| # vim: set fileencoding=utf-8 | |
| # | |
| # USAGE: | |
| # Back up your tmux old config, run the script and redirect stdout to your conf | |
| # file. Example: | |
| # | |
| # $ cp ~/.tmux.conf ~/.tmux.conf.orig | |
| # $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf | |
| # |
Note: This workaround is no longer necessary in Windows 10 Insider build 17046 and later. As of 2018-02-07, the patch hasn't yet made it to stable.
do-release-upgrade, as you normally would. It will error out and leave your system in a partially upgraded state.wget -O - https://gist.githubusercontent.com/Zenexer/10bc12fa5c99848b4b2150184f6beee5/raw/ubuntu-fix.sh | sh -s