It happens that there are many standards for storing cryptography materials (key, certificate, ...) and it isn't always obvious to know which standard is used by just looking at file name extension or file content. There are bunch of questions on stackoverflow asking about how to convert from PEM to PKCS#8 or PKCS#12, while many tried to answer the questions, those answers may not help because the correct answer depends on the content inside the PEM file. That is, a PEM file can contain many different things, such as an X509 certificate, a PKCS#1 or PKCS#8 private key. The worst-case scenario is that someone just store a non-PEM content in "something.pem" file.
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
import { | |
ActionContext, | |
ActionTree, | |
GetterTree, | |
MutationTree, | |
Module, | |
Store as VuexStore, | |
CommitOptions, | |
DispatchOptions, | |
} from 'vuex' |
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
import UIKit | |
import Flutter | |
@UIApplicationMain | |
@objc class AppDelegate: FlutterAppDelegate { | |
override func application( | |
_ application: UIApplication, | |
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? | |
) -> Bool { | |
let controller : FlutterViewController = window?.rootViewController as! FlutterViewController |
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
# ========================================================== | |
# NPM | |
# ========================================================== | |
npm set registry https://registry.npmmirror.com # 注册模块镜像 | |
npm set disturl https://npmmirror.com/mirrors/node # node-gyp 编译依赖的 node 源码镜像 | |
## 以下选择添加 | |
npm set sass_binary_site https://registry.npmmirror.com/mirrors/node-sass # node-sass 二进制包镜像 | |
npm set electron_mirror https://registry.npmmirror.com/mirrors/electron/ # electron 二进制包镜像 |
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
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj | |
Cloning into 'my-awesome-proj'... | |
ssh: connect to host github.com port 22: Connection timed out | |
fatal: Could not read from remote repository. | |
$ # This should also timeout | |
$ ssh -T git@github.com | |
ssh: connect to host github.com port 22: Connection timed out | |
$ # but this might work |
UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker
now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
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/sh -x | |
set -e | |
SIZES=" | |
16,16x16 | |
32,16x16@2x | |
32,32x32 | |
64,32x32@2x | |
128,128x128 |
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
<style> | |
input[type="file"]{ | |
position: absolute; | |
top: -500px; | |
} | |
div.file-listing{ | |
width: 200px; | |
} |
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
#in ZSH, add to ~/.zprofile | |
set_http_proxy() { | |
if [ -e $HOME/.proxyrc ]; then | |
. $HOME/.proxyrc | |
fi | |
if [ -z $http_proxy ]; then | |
echo "No proxy config, environment found, connection attempt failed." | |
echo "Let's setup a config or update your password." |
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
import UIKit | |
// If you enjoyed this talk (video link will be up soon), then you might also enjoy our book Advanced Swift: http://www.objc.io/books/advanced-swift | |
struct Person { | |
let name: String | |
let city: String | |
} | |
let people = [ |
NewerOlder