目标:不依赖第三方服务
使用 gopass 管理密码,gopass 是 https://www.passwordstore.org/ 的 go 语言实现。密码会被加密之后存储到 git repo 里,多个设备间使用 git 进行同步。
| Richards: 30575 | |
| DeltaBlue: 59837 | |
| Crypto: 29045 | |
| RayTrace: 80726 | |
| EarleyBoyer: 51088 | |
| RegExp: 7426 | |
| Splay: 26069 | |
| SplayLatency: 47685 | |
| NavierStokes: 30627 | |
| PdfJS: 21522 |
| import pymongo | |
| import requests | |
| import sys | |
| col = pymongo.MongoClient().get_database('ziroom').get_collection('room') | |
| r = requests.session() | |
| r.headers['User-Agent'] = 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1' | |
| def get_list_of_room(name): | |
| page = 1 |
| #!/bin/bash | |
| host="10.9.0.1" | |
| pw="root" | |
| user="root" | |
| ipmitool -I lanplus -H $host -U $user -P $pw power on; | |
| sleep 1; | |
| ipmitool -I lanplus -H $host -U $user -P $pw raw 0x30 0x30 0x01 0x00; | |
| ipmitool -I lanplus -H $host -U $user -P $pw raw 0x30 0x30 0x02 0xff 0x10; # could be 0x00 - 0xff |
| -- Logs begin at Mon 2018-07-16 15:58:02 CST, end at Sun 2018-08-19 20:17:36 CST. -- | |
| Aug 19 20:07:54 panda-hp kernel: microcode: microcode updated early to revision 0x96, date = 2018-05-15 | |
| Aug 19 20:07:54 panda-hp kernel: Linux version 4.18.3-arch1-1-ARCH (builduser@heftig-24267) (gcc version 8.2.0 (GCC)) #1 SMP PREEMPT Sat Aug 18 09:22:54 UTC 2018 | |
| Aug 19 20:07:54 panda-hp kernel: Command line: \\vmlinuz-linux root=UUID=6a2c6f7f-bbdf-4354-8fc3-d2c138b11137 rootflags=subvol=root rw initrd=/intel-ucode.img initrd=/initramfs-linux.img | |
| Aug 19 20:07:54 panda-hp kernel: KERNEL supported cpus: | |
| Aug 19 20:07:54 panda-hp kernel: Intel GenuineIntel | |
| Aug 19 20:07:54 panda-hp kernel: AMD AuthenticAMD | |
| Aug 19 20:07:54 panda-hp kernel: Centaur CentaurHauls | |
| Aug 19 20:07:54 panda-hp kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers' | |
| Aug 19 20:07:54 panda-hp kernel: x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers' |
| package main | |
| import "github.com/mongodb/mongo-go-driver/bson" | |
| type Test struct { | |
| Bool *bool `bson:"bool"` | |
| } | |
| func Bool(payload bool) *bool { | |
| return &payload |
| # checkout repo | |
| git clone git://kernel.ubuntu.com/ubuntu/ubuntu-bionic.git ubuntu-bionic | |
| # install related stuff | |
| apt build-dep linux-image-$(uname -r) | |
| apt install libncurses5-dev libudev-dev libssl-dev | |
| # patch -p1 < you patch | |
| make oldconfig | |
| make -j $(nproc) deb-pkg LOCALVERSION=-your-suffix |
目标:不依赖第三方服务
使用 gopass 管理密码,gopass 是 https://www.passwordstore.org/ 的 go 语言实现。密码会被加密之后存储到 git repo 里,多个设备间使用 git 进行同步。
| diff --git a/src/lib/request.ts b/src/lib/request.ts | |
| index 9a8b3e8..52fd7b2 100644 | |
| --- a/src/lib/request.ts | |
| +++ b/src/lib/request.ts | |
| @@ -110,14 +110,9 @@ export async function getExternalControllerConfig () { | |
| } | |
| export const getInstance = createAsyncSingleton(async () => { | |
| - const { | |
| - hostname, |
| from bcoding import bencode, bdecode | |
| import sys | |
| import time | |
| import os | |
| import pathlib | |
| remapped = {} | |
| rename_list = [] | |
| #!/bin/bash | |
| from=sda | |
| to=sdb | |
| set -ex | |
| apt -y install parted | |
| sgdisk /dev/${from} -R /dev/${to} | |
| sgdisk -G /dev/${to} | |
| mkfs.btrfs -f /dev/${to}3 | |
| mkfs.vfat /dev/${to}2 |