Directories on host machine:
-
/data/certbot/letsencrypt
-
/data/certbot/www
-
Nginx server in docker container
docker run -d --name nginx \
# This file `obj.txt` is a hexdump with comments to manually build an ELF file. | |
# Lines starting with '#' are comments. | |
# The rest is read as per `xxd -r -p` (see `man xxd`) | |
# You can build the binary executable `obj.elf` using the command: | |
# ```bash | |
# <obj.txt grep -v '^#' | xxd -r -p >obj.elf | |
# ``` | |
# You can then use chmod to make `obj.elf` executable. | |
# ================== |
Directories on host machine:
/data/certbot/letsencrypt
/data/certbot/www
Nginx server in docker container
docker run -d --name nginx \
I wrote this answer on stackexchange, here: https://stackoverflow.com/posts/12597919/
It was wrongly deleted for containing "proprietary information" years later. I think that's bullshit so I am posting it here. Come at me.
Amazon is a SOA system with 100s of services (or so says Amazon Chief Technology Officer Werner Vogels). How do they handle build and release?
Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex
command line tool.
To learn more about migrations, check out this article on the different types of database migrations!
import { autorun } from "mobx"; | |
import { createStore, Action, Reducer } from "./remox" | |
interface Person { firstName: string; lastName: string; } | |
interface SetFirstName { type: "SET_FIRST_NAME", newFirstName: string; } | |
interface SetLastName { type: "SET_LAST_NAME", newLastName: string; } | |
function personReducer(state:Person, action: SetFirstName | SetLastName) { |
# This file is: ~/.ssh/config | |
# You may have other (non-CodeCommit) SSH credentials stored in this | |
# config file – in addition to the CodeCommit settings shown below. | |
# NOTE: Make sure to run [ chmod 600 ~/.ssh/config ] after creating this file! | |
# Credentials for Account1 | |
Host awscc-account1 # 'awscc-account1' is a name you pick | |
Hostname git-codecommit.us-east-1.amazonaws.com # This points to CodeCommit in the 'US East' region |
/** | |
* A linear interpolator for hexadecimal colors | |
* @param {String} a | |
* @param {String} b | |
* @param {Number} amount | |
* @example | |
* // returns #7F7F7F | |
* lerpColor('#000000', '#ffffff', 0.5) | |
* @returns {String} | |
*/ |
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32 | |
global start | |
section .text | |
start: | |
push dword msg.len | |
push dword msg | |
push dword 1 | |
mov eax, 4 |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |