See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
// In an async IIFE with await | |
(async () => { | |
const response = await fetch('http://api.open-notify.org/astros.json') | |
const json = await response.json() | |
console.log(json) | |
})(); | |
// Using .then() | |
fetch('http://api.open-notify.org/astros.json') |
// Spec http://www.ecma-international.org/ecma-262/6.0/#sec-json.stringify | |
const replacer = (key, value) => | |
value instanceof Object && !(value instanceof Array) ? | |
Object.keys(value) | |
.sort() | |
.reduce((sorted, key) => { | |
sorted[key] = value[key]; | |
return sorted | |
}, {}) : | |
value; |
import javax.crypto.Cipher; | |
import java.io.InputStream; | |
import java.security.*; | |
import java.util.Base64; | |
import static java.nio.charset.StandardCharsets.UTF_8; | |
public class RsaExample { | |
public static KeyPair generateKeyPair() throws Exception { | |
KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); |
Create a new repository, or reuse an existing one.
Generate a new SSH key:
ssh-keygen -t rsa -C "[email protected]"
Copy the contents of the file ~/.ssh/id_rsa.pub
to your SSH keys in your GitHub account settings (https://github.com/settings/keys).
Test SSH key: