macOS supports using Touch ID to authenticate sudo commands instead of typing your password.
Create or edit /etc/pam.d/sudo_local:
sudo vim /etc/pam.d/sudo_local| SMART Information for /dev/nvme0n1 | |
| -------------------------------------------------- | |
| | Metric | Value | | |
| | -------------------- | ------------------------- | | |
| | Temperature | 46 | | |
| | Data Written | 4.38 TB | | |
| | Data Read | 30.9 TB | | |
| | Power On Hours | 19 | | |
| -------------------------------------------------- | |
| Temperature Sensors: 50, 51, 52, 53, 54, 55, 56, 57 |
| Android Emulator (ARM64) on EC2 - 2022 | |
| --------------------------------------- | |
| 1. Launch EC2 ARM based Instance (a1.metal / a1.2xlarge): (16 Gb RAM, 32Gb Disk), Ubuntu Server 22.04 LTS (HVM) ARM x64 | |
| 2. sudo apt update && sudo apt upgrade | |
| 3. sudo apt install default-jdk python3-pip repo python-is-python3 unzip libpcre2-dev adb | |
| 4. wget https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip | |
| 5. unzip commandlinetools-linux-8512546_latest.zip -d android-sdk | |
| 6. sudo mv android-sdk /opt/ | |
| 7. mkdir /opt/android-sdk/cmdline-tools/latest | |
| 8. mv /opt/android-sdk/cmdline-tools/* /opt/android-sdk/cmdline-tools/latest (ignore the error) |
As a developer, it bothers me when someone sends me a large pdf file compared to the number of pages. Recently, I recieved a 12MB scanned document for just one letter-sized page... so I got to googlin, like I usually do, and found ghostscript!
to learn more abot ghostscript (gs): https://www.ghostscript.com/
What we are interested in, is the gs command line tool, which provides many options for manipulating PDF, but we are interested in compressign those large PDF's into small yet legible documents.
credit goes to this answer on askubuntu forum: https://askubuntu.com/questions/3382/reduce-filesize-of-a-scanned-pdf/3387#3387?newreg=bceddef8bc334e5b88bbfd17a6e7c4f9
| #[cfg(test)] | |
| mod tests_lifetime { | |
| use std::future::Future; | |
| async fn f(_x: &i32) { | |
| () | |
| } | |
| // 写法 1 |
TL;DR: Too Long; Don’t Read. PR 内容太多,没办法看
PR:Pull Request. 拉取请求,给其他项目提交代码
PTAL:Please take a look. 请看一看
LGTM: Looks Good To Me. 代码已经过 review,可以合并
SGTM: Sounds Good To Me. 和上面那句意思差不多,也是已经通过了 review 的意思
WIP: Work In Progress. 告诉项目维护者这个功能还未完成,方便维护者前 review 已提交的代码
PTAL: Please Take A Look. 提示项目 Owner/contributor review
TBR: To Be Reviewed. 提示维护者进行 review
TBD: To Be Done (or Defined/Discussed/Decided/Determined). 根据语境不同意义有所区别,但一般都是还没搞定的意思
| import java.math.BigInteger; | |
| import java.util.function.Function; | |
| /** | |
| * @author yinheli | |
| */ | |
| public class RSATest { | |
| private static BigInteger[] commonE = new BigInteger[]{ |
| import javax.net.ssl.SSLSocket; | |
| import javax.net.ssl.SSLSocketFactory; | |
| import java.io.*; | |
| /** Establish a SSL connection to a host and port, writes a byte and | |
| * prints the response. See | |
| * http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services | |
| */ | |
| public class SSLPoke { | |
| public static void main(String[] args) { |
| # Example usage with several configuration sets as in multiple connections durations and threads. | |
| # You may go take the rest of the day off while this will run ;) | |
| for duration in 10s 1m 10m 1h | |
| do | |
| for connections in 100 200 300 400 500 600 | |
| do | |
| for thread in 1 2 3 4 5 | |
| do | |
| wrk -d$duration -c$connections -t$thread -s wrk-script.lua http://localhost:4001/beacon/0001/demo-load-test/test/web |
| {"0.15388708864338696":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMEywWiPIt/xn6y9RmhhJ2u29WhuNE3mxct\r\nmBPun89q3vI2bsDDXT6yc8QBslPaE3XWXkr7N1ykXrwgjpVfAAkVBs3/AAAACDxn\r\naXRodWI+wv8AAACNBBATCAA//wAAAAWCVs6wWv8AAAACiwn/AAAACZDcNlEK8wxb\r\nef8AAAAFlQgJCgv/AAAAA5YBAv8AAAACmwP/AAAAAp4BAAA+XwD+LqIXxuH0i4Wo\r\nPstbZGTGrcvuKKqaXdd6JhCRhnO+u5wBAITxX5G9VZU6p3Pybw1y0e5h4jkieDND\r\nrT7ItECBfTbuzv8AAABWBAAAAAASCCqGSM49AwEHAgMElSBHEyqPc7+b+quUZmMN\r\nNd21FQoyt2BVfwgH7FRttkwgDg0/Rp8hv9Ym+D0qCV/7qfcZX0exkutY9eG0iXz4\r\nFQMBCAfC/wAAAG0EGBMIAB//AAAABYJWzrBa/wAAAAmQ3DZRCvMMW3n/AAAAApsM\r\nAAA49AEAydCVMjqGeAfzETbZv5dtZ+LoSQopNAYjSG5Gekc2biQA+wf6XQe8j1vt\r\n0Myv/BNzCpqHSlBUAwTicWrqKYJ+PBB7\r\n=q6fo\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n"} |