- Copy content of
vsix-bookmarklet
, create a bookmark in your browser. - Navigate to the web page of the VS Code extension you want to install.
- Click the bookmark you just created, then click the download button.
- After download finished, rename the file extension to
*.vsix
. - In VS Code, select Install from VSIX... in the extension context menu.
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 | |
# This script is enabling (uncommenting) the Japanese locale and regenerates them | |
sudo steamos-readonly disable | |
sudo pacman-key --init | |
sudo pacman-key --populate archlinux | |
sudo pacman -S glibc | |
sudo sed -i "s%#ja_JP.UTF-8 UTF-8%ja_JP.UTF-8 UTF-8%" /etc/locale.gen | |
sudo locale-gen |
QNAP NAS model TS-453 Pro has limited documentation on how to control its various peripherals, namely:
- the front LCD display, a 2 row, 16 column blue & white LCD display, and its two menu buttons ("ENTER", "SELECT")
- the front LEDs "STATUS" (red & green) & "USB" (blue)
- the 4 "disk error" LEDs (red)
- the front "USB COPY" button
- the main rear fan
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
# post_loc.txt contains the json you want to post | |
# -p means to POST it | |
# -H adds an Auth header (could be Basic or Token) | |
# -T sets the Content-Type | |
# -c is concurrent clients | |
# -n is the number of requests to run in the test | |
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |
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 -xe | |
systemctl stop pvestatd.service | |
systemctl stop pvedaemon.service | |
systemctl stop pve-cluster.service | |
systemctl stop corosync | |
systemctl stop pve-cluster | |
sqlite3 /var/lib/pve-cluster/config.db "delete from tree where name = 'corosync.conf';" |
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
:: 启动后需要保留窗口, 关闭窗口则结束进程 | |
aria2c --conf-path=aria2.conf -D |
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
# https://www.qnap.com/en/how-to/faq/article/how-do-i-find-out-which-process-prevents-the-hard-drives-from-standby-mode | |
# wget https://eu1.qnap.com/Storage/tsd/utility/standby_debug.sh;sh standby_debug.sh | |
binary="" | |
case "$(uname -m)" in | |
*x86_64*) | |
echo "Arch: x86_64" | |
binary=https://download.qnap.com/Storage/tsd/utility/Disk_Standby_Debug_x86_64/Disk_Standby_Debug | |
;; |
All control characteristics are under Service 00001523-1212-EFDE-1523-785FEABCD124
Mode = 00001524-1212-EFDE-1523-785FEABCD124
(READ, WRITE, NOTIFY)
Identify = 00008421-1212-EFDE-1523-785FEABCD124
(WRITE)
Power State = 00001525-1212-EFDE-1523-785FEABCD124
(WRITE, newer firmware also had READ and NOTIFY)
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
package net.stf.threelevelexpandablelistview; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseExpandableListAdapter; | |
import android.widget.ExpandableListView; |
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 python3 | |
import sys, os, errno | |
def mkdir_p(path): | |
try: | |
os.makedirs(path) | |
except OSError as exc: | |
if exc.errno == errno.EEXIST and os.path.isdir(path): | |
pass |
NewerOlder