Class names are CamelCase
.
Methods and variables are snake_case
.
Methods with a ?
suffix will return a boolean.
#Heading 1 ##Heading 2 ###Heading 3 ####Heading 4 #####Heading 5 ######Heading 6
Paragraph
Example inputs:
Variable | Value |
---|---|
key | the shared secret key here |
message | the message to hash here |
Reference outputs for example inputs above:
| Type | Hash |
#!/bin/bash | |
# | |
# Ubuntu post-install script | |
# | |
# Author: | |
# Marco Rougeth <[email protected]> | |
# | |
# Description: | |
# A post-installation bash script for Ubuntu (13.10) | |
# |
Deploying a simple Rails application with AWS Elastic Beanstalk by Julien SIMON, Principal Technical Evangelist @ Amazon Web Services | |
18/02/2016 | |
http://www.slideshare.net/JulienSIMON5/deploying-a-simple-rails-application-with-aws-elastic-beanstalk | |
1. . Create a Git repository with AWS CodeCommit | |
$ aws codecommit create-repository --repository-name blog --region us-east-1 --repository-description "ElasticBeanstalk demo" | |
$ git clone ssh://git-codecommit.us- east-1.amazonaws.com/v1/repos/blog | |
2. Create a new Rails application |
#!/usr/bin/env sh | |
# checks to see if running | |
launchctl list | grep elasticsearch | |
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist | |
launchctl remove homebrew.mxcl.elasticsearch | |
pkill -f elasticsearch |
Over the weekend I spun up a new Elixir :ecto, "2.2.7" project that I was able to get working with CockroachDB and this adapter fork - with some caveats I wanted to share to help others.
Only the root
user can create databases
This requires you configure the Ecto.Adapters.Postgres
username
as root
or else the mix ecto.create
command will always fail. You can go back and change your configured username
to something else after the database has been created, or create your database and user permissions using cockroach sql
and skip the mix ecto.create
command.
Configuring Ecto primary_key ID to be created by CockroachDB
By default when configuring your Ecto.Schema
using autogenerate: false
it appears either CockroachDB, Ecto or the Postrex adapter (I did not investigate this) uses the BIGINT
unique_rowid()
function as the default value for IDs
@primary_key {:id, :id, autogenerate:
#! /bin/bash | |
# Shell script to install apache/mysql/php/wordpress into an EC2 instance of Amazon AMI Linux. | |
# Step 1: Create an AWS EC2 instance | |
# Step 2: ssh in like: ssh -v -i wordpress.pem [email protected] | |
# Step 3: Run this as root/superuser, do sudo su | |
echo "Shell script to install apache/mysql/php/wordpress into an EC2 instance of Amazon AMI Linux." | |
echo "Please run as root, if you're not, choose N now and enter 'sudo su' before running the script." | |
echo "Run script? (y/n)" |
Note: "Forked" from Latency Numbers Every Programmer Should Know
Event | Nanoseconds | Microseconds | Milliseconds | Comparison |
---|---|---|---|---|
L1 cache reference | 0.5 | - | - | - |
Branch mispredict | 5.0 | - | - | - |
L2 cache reference | 7.0 | - | - | 14x L1 cache |
Mutex lock/unlock | 25.0 | - | - | - |