# 设置配置
# Windows默认1080端口
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
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 | |
merge_commit() { | |
git show --no-patch --format='%P' "$@" | head -1 | grep -q ' ' | |
} | |
commit_meta() { | |
git show --no-patch --format="* %cd %aN <%ae> - %H" --date=local "$@" | \ | |
head -1 | \ | |
sed -E 's/^(\* [a-z0-9 ]{9,10}) \d{2}:\d{2}:\d{2}/\1/i' |
Start off with some Rust source code
hw.rs :
#[link(name = "extern")]
extern {
fn hello();
}
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 bash | |
# --slave /usr/bin/$1 $1 /usr/bin/$1-\${version} \\ | |
function register_clang_version { | |
local version=$1 | |
local priority=$2 | |
update-alternatives \ | |
--install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${version} ${priority} \ |
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
$ python i18njson-translate.py --help | |
Usage: i18njson-translate.py [OPTIONS] INPUTFILE OUTPUT | |
Process and translate .po or JSON files and generate translated .po file | |
in result. Can work with exist .po files and if in initial file msgid | |
dissapear then mark translaed string as obsolete. Try to play nice with | |
version control systems and follow initial file order format, you will get | |
predicteable diffs. | |
Options: |
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
(* | |
## Goal | |
This script is make new calendar event to fantastical2 from things3 complete todos in 'Logbook' on specified date. | |
## How to use: | |
* Default is today | |
* `$ osascript things-to-fantastical.applescript` | |
* The specified date | |
* `$ osascript things-to-fantastical.applescript 2017/08/12` | |
*) |
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
# Linux kernel verbose boot and logging to serial console | |
# | |
# Check Documentation/kernel-parameters.txt [1] to check all aplicable options for your kernel version | |
# | |
# VERSION="v"$(uname -r | sed -e 's/\(\.0\)\?-.*$//') | |
# [1] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/plain/Documentation/kernel-parameters.txt?id=refs/tags/$VERSION | |
linux /vmlinuz root=/dev/sda1 ro consoleblank=0 earlyprintk=ttyS0 console=ttyS0 panic=1 oops=panic panic_on_warn verbose INIT_VERBOSE=yes init=/sbin/init -v | |
initrd /initrd.gz | |
boot |
This is basically a rehash of an original post on CNXSoft - all credit (particularly for the Virtio device arguments used below) belongs to the author of that piece.
Download the latest uefi1.img
image. E.g. ubuntu-16.04-server-cloudimg-arm64-uefi1.img
from https://cloud-images.ubuntu.com/releases/16.04/release/
Download the UEFI firmware image QEMU_EFI.fd
from https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/
Determine your current username and get your current ssh public key:
Current version: 1.0.19 1.0.15 (as of 2018-12-10)