markdown ROR安装rmagick报错

rmagick error.md
# ROR安装rmagick报错

参考官网 `https://github.com/rmagick/rmagick/`

在`ubuntu`系统中,需要安装环境
```
sudo apt-get install libmagickwand-dev
```

然后再安装
```ruby
gem 'rmagick'
```

markdown ARK Ledger Nano S环境Setup.md

ARK Ledger Nano S Environment Setup.md

# ARK Ledger Nano S Environment Setup
> Nano S version **>=1.5.5**

**Steps:**
1) [Install Vagrant & VirtualBox.](#install-vagrant-and-virtualbox)
2) [Get Ledger-Vagrant.](#get-ledger-vagrant)
3) [Setup the Ledger-Vagrant Machine.](#setup-the-ledger-vagrant-machine)
4) [Connect the Ledger.](#connect-ledger-via-usb)
5) [Connect to the Vagrant Machine.](#connect-to-the-ledger-vagrant-machine)
6) [Get the ARK Ledger App.](#get-the-ark-ledger-app)
7) [Modify the udev Rules.](#modify-udev-rules-via-vagrant-ssh)
8) [Update the nanos-secure-sdk.](#update-the-nanos-secure-sdk)
9) [Flash the ARK App.](#flash-the-arkecosystem-ledger-app)

---

### 1) Install Vagrant and VirtualBox

#### macOS

1) > `brew cask install virtualbox`
2) > `brew cask install vagrant`

---

### 2) Get Ledger-Vagrant

1) > `git clone https://github.com/fix/ledger-vagrant`
2) > `cd ledger-vagrant`

---

### 3) Setup the Ledger-Vagrant machine

1) > `vagrant up`
_note: environment setup will take a few minutes._


---

### 4) Connect Ledger via USB

---

### 5) Connect to the Ledger-Vagrant machine


1) > `vagrant ssh`

---

### 6) Get the ARK Ledger App

**Option 1**: Place your project folder in the _`ledger-vagrant/apps`_ directory.

**Option 2**: Clone via git
1) > `cd apps`
2) > `git clone https://github.com/ArkEcosystem/ledger`

---

### 7) Modify udev rules via _vagrant ssh_

**Option 1**: wget bash script from gist.
> `wget -q -O - https://gist.githubusercontent.com/sleepdefic1t/71726664f2996ce8d64bf7bf64a9e4d8/raw/a2662606e75545af9c3f630ff35e9ed18c1f3601/update-ledger-udev.sh | sudo bash`


**Option 2**: RYO updated bash script.

Append `MODE="0660", GROUP="plugdev"` to Ledger udev rules.
> src: [github/LedgerHQ/udev-rules/issues/#4](https://github.com/LedgerHQ/udev-rules/issues/4#issuecomment-511144888)


```bash
cat <<EOF > /etc/udev/rules.d/20-hw1.rules
# HW.1 / Nano
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c|2b7c|3b7c|4b7c", TAG+="uaccess", TAG+="udev-acl"
# Blue
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0000|0000|0001|0002|0003|0004|0005|0006|0007|0008|0009|000a|000b|000c|000d|000e|000f|0010|0011|0012|0013|0014|0015|0016|0017|0018|0019|001a|001b|001c|001d|001e|001f", TAG+="uaccess", TAG+="udev-acl", MODE="0660", GROUP="plugdev"
# Nano S
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001|1000|1001|1002|1003|1004|1005|1006|1007|1008|1009|100a|100b|100c|100d|100e|100f|1010|1011|1012|1013|1014|1015|1016|1017|1018|1019|101a|101b|101c|101d|101e|101f", TAG+="uaccess", TAG+="udev-acl", MODE="0660", GROUP="plugdev"
# Aramis
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0002|2000|2001|2002|2003|2004|2005|2006|2007|2008|2009|200a|200b|200c|200d|200e|200f|2010|2011|2012|2013|2014|2015|2016|2017|2018|2019|201a|201b|201c|201d|201e|201f", TAG+="uaccess", TAG+="udev-acl", MODE="0660", GROUP="plugdev"
# HW2
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0003|3000|3001|3002|3003|3004|3005|3006|3007|3008|3009|300a|300b|300c|300d|300e|300f|3010|3011|3012|3013|3014|3015|3016|3017|3018|3019|301a|301b|301c|301d|301e|301f", TAG+="uaccess", TAG+="udev-acl", MODE="0660", GROUP="plugdev"
# Nano X
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0004|4000|4001|4002|4003|4004|4005|4006|4007|4008|4009|400a|400b|400c|400d|400e|400f|4010|4011|4012|4013|4014|4015|4016|4017|4018|4019|401a|401b|401c|401d|401e|401f", TAG+="uaccess", TAG+="udev-acl", MODE="0660", GROUP="plugdev"
EOF

udevadm trigger
udevadm control --reload-rules
```

##### Create a new bash file from the above using terminal

1) > **Create a new file**:
    `nano`
2) >_**<paste udev rules>**_
3) > _**Write the changes**_:
    `^O`
4) > **"File Name to Write"**:
    `update-udev.sh`
    _hit enter to save the filename_
5) > **Exit file**
    `^X`
6) > **Run the bash script**:
    `sh ./update-udev.sh`

---


### 8) Update the nanos-secure-sdk
> _note: versions \<1.5.5 can skip this step._

_**Option 1**_: Update the NanoS-Secure-SDK
> _did not work for me on macOS_
1) > `cd /opt/bolos/nanos-secure-sdk`
2) > `sudo git pull`

_**Option 2**_: Manually delete and clone the NanoS-Secure-SDK
1) > `cd /opt/bolos/`
2) > `rm -rf nanos-secure-sdk`
3) > `sudo git clone https://github.com/LedgerHQ/nanos-secure-sdk`


---

### 9) Flash the ArkEcosystem/Ledger App

1) > `cd ~/apps/ledger`
2) > `sh ./rebuild.sh`

---

From there,
you should see compiler output,
then Ledger will begin the app flashing process with prompts on the Nano S device.

---

### Additional notes:


#### TargetId's

```
+-----------------+------------+
|    FirmWare     | Target ID  |
+-----------------+------------+
| Nano S <= 1.3.1 | 0x31100002 |
| Nano S 1.4.x    | 0x31100003 |
| Nano S 1.5.x    | 0x31100004 |
|                 |            |
| Blue 2.0.x      | 0x31000002 |
| Blue 2.1.x      | 0x31000004 |
| Blue 2.1.x V2   | 0x31010004 |
|                 |            |
| Nano X          | 0x33000004 |
|                 |            |
| MCU,any version | 0x01000001 |
+-----------------+------------+
```

#### LedgerBlue Python Script Reference

> [ledger.readthedocs/blue-loader-python/script_reference](https://ledger.readthedocs.io/projects/blue-loader-python/en/0.1.26/script_reference.html)

#### Ledger Nano S Debugging

> [ledger.readthedocs.io/debugging](https://ledger.readthedocs.io/en/latest/userspace/debugging.html)

markdown 升级的Ubuntu 18.04突然慢慢启动?读这个。

https://www.dedoimedo.com/computers/ubuntu-beaver-slow-boot.html

Upgraded Ubuntu 18.04 suddenly boots slowly Read this.
#### To get the boot time, just run systemd-analyze:
```
systemd-analyze
systemd-analyze critical-chain

```

markdown Openshift Cheatsheet

openshift-cheatsheet.md
```

oc get pods
```

## Creating New Project
```
oc new-project <projectname> \
  --description=<description> \
  --display-name=<display_name>
```

## Creating an Application

```
oc new-app https://github.com/arttuladhar/hello-node.git -l name=hello-nodejs

# OpenShift Container Platform finds the matching builder image and then creates resources for the application
(image stream, build configuration, deployment configuration, service)

oc logs -f bc/hello-nodejs
```

## Creating a Route

```
oc expose service hello-nodejs

oc get route
```

```
# Delete All Resources using Label Selector
oc delete all -l app=jenkins-ephemeral
```

## Resources
* https://docs.openshift.com/container-platform/3.7/getting_started/developers_cli.html
* 

minishift.md
## Starting Minishift with VirtualBox
```
minishift start --vm-driver virtualbox
```

## Get Minishift Status
```
minishift status
```

markdown 自己的SQL Server评论公约

ownCommentConvention
> This is a way to comment and have ordered and legible my support code

--============================================================<br/>
--  RESPONSE & RESPONSEITEM CHANGE STATUS SCRIPT<br/>
--============================================================

		INSERT INTO [dbo].[Table]
		(
			--ID - column value is auto-generated
			Field1
		)

--  Update & Select for Insert <br/>
--  ==========================

--  Response:

		SELECT  DISTINCT GETDATE(), 'mmm', 'Status Changed by request of user xxxx ticket xxxxx', r.rID, 0 
		--UPDATE r SET R.StatusID=1


--  ResponseItem:

markdown PDF字体type3转type1

.md
https://www.cnblogs.com/zeedmood/p/5782142.html

markdown vscode cheatsheet

vscode_cheatsheet.md


[シーケンス図](https://blog.asial.co.jp/2019/03/15/Visual_Studio_Code_%E3%81%A7%E3%81%AF%E3%81%98%E3%82%81%E3%82%8B%E3%82%B7%E3%83%BC%E3%82%B1%E3%83%B3%E3%82%B9%E5%9B%B3)

markdown ヘッダに要素を追加する

vuejs_add_header
```
  head() {
    return {
      script: [
        {
          src: `https://hogehoge?key=${foo}`,
          type: 'text/javascript'
        },
        {
          src: 'https://fugafuga.js',
          type: 'text/javascript'
        }
      ]
    }
  },
```

markdown js ES

js_es.md
### Map array to object
```js
const arr = [{id:1,title:'a'},{id:2,title:'b'},{id:3,title:'c'}]
const obj = Object.assign({}, ...arr.map(item => ({[item.id]:item})))
```

markdown 的Windows软件安装清单

checklist.md
# Windows软件安装清单

## 数据库
```
SQL Server 2014
Mysql
Oracle
Postgresql
```

## 数据库连接工具
```
Navicat Premium
sql developer
```

## IDE
```
Visual Studio 2015
IDEA
Ruby Mine
PyCharm

Android Studio
```

## 文本编辑器
```
VS Code
NotePad++
Cacher
```

## 浏览器
```
Chrome
Firefox

```

## 虚拟机
```
VMWare 2015
```

## 安全软件
```
火绒

```
## Office
```
Office 2016
Visio 2013
Project 2013
```

## 邮件
```
MicroSoft Mail
Foxmail 
```

## 环境
```
Node.js
JDK
Python
Maven
Redis
```

## 服务
```
IIS
Tomcat
Nginx
```
## 远程连接软件
```
MobaXterm
向日葵
TeamViewer
```


## 其他
```
ShadowsocksR翻墙
CAM电脑监测
Git
IObit软件卸载
```