eb init
eb config save my-env-name --cfg my-config-name # save the environment config
eb terminate # terminate the environment
eb create my-new-env-name --cfg my-config-name # Create a new cloned environment with a new name
PROMPT='%{%f%b%k%}$(build_prompt)%{$reset_color%} | |
➜ ' |
public class EntityManagerHelper { | |
private static final EntityManagerFactory emf; | |
private static final ThreadLocal<EntityManager> threadLocal; | |
static { | |
emf = Persistence.createEntityManagerFactory("BookStoreUnit"); | |
threadLocal = new ThreadLocal<EntityManager>(); | |
} |
eb init
eb config save my-env-name --cfg my-config-name # save the environment config
eb terminate # terminate the environment
eb create my-new-env-name --cfg my-config-name # Create a new cloned environment with a new name
const convertContent = content => { | |
const blockMap = content.getBlockMap(); | |
let newBlockMap = Map(); | |
blockMap.valueSeq().forEach(block => { | |
if (block.getType() === 'code') { | |
const data = block.getData().merge({ language: 'javascript' }); | |
const newBlock = block.merge({ type: 'code-block', data }); | |
newBlockMap = newBlockMap.set(block.key, newBlock); | |
} |
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
title_page: | |
logo_image: image:logo.png[] | |
page: | |
layout: portrait | |
margin: [3.2cm, 2cm, 2.2cm, 2cm] | |
size: A4 | |
base: | |
font_color: #333333 | |
font_family: Helvetica | |
font_size: 12 |
Documenting all my install steps
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#verify-key-pair-fingerprints | |
openssl rsa -in ~/.ssh/privatekey -pubout -outform DER | openssl md5 -c | |
openssl pkcs8 -in path_to_private_key -inform PEM -outform DER -topk8 -nocrypt | openssl sha1 -c |