# bundle exec rails c
Could not find rake-12.3.0 in any of the sources
Run `bundle install` to install missing gems.
# bundle install --binstubs
class LinkedinClient(object): | |
""" | |
Usage: | |
client = LinkedinClient(access_token) | |
user_details = client.get_user_details() | |
""" | |
FIELD_SELECTORS = ['id', 'firstName', 'lastName', | |
'profilePicture(displayImage~:playableStreams)', | |
'emailAddress'] |
# Usage: | |
# aws cloudformation --region <region> create-stack --stack-name <stack name> --template-body file://vpc-fargate.yaml | |
# This template will: | |
# Create a VPC with: | |
# 2 Public Subnets | |
# 2 Private Subnets | |
# An Internet Gateway (with routes to it for Public Subnets) | |
# A NAT Gateway for outbound access (with routes from Private Subnets set to use it) | |
# |
These are notes for my Prometheus workshop. The follow-up workshop on Prometheus/Kubernetes can be found here.
node_exporter
If you would like to persist data from your ECS containers, i.e. hosting databases like MySQL or MongoDB with Docker, you need to ensure that you can mount the data directory of the database in the container to volume that's not going to dissappear when your container or worse yet, the EC2 instance that hosts your containers, is restarted or scaled up or down for any reason.
Don't know how to create your own AWS ECS Cluster? Go here!
Sadly the EC2 provisioning process doesn't allow you to configure EFS during the initial config. After your create your cluster, follow the guide below.
If you're using an Alpine-based Node server like duluca/minimal-node-web-server follow this guide:
# http://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise.cosine_similarity.html | |
import numpy as np | |
from sklearn.metrics.pairwise import cosine_similarity | |
# The usual creation of arrays produces wrong format (as cosine_similarity works on matrices) | |
x = np.array([2,3,1,0]) | |
y = np.array([2,3,0,0]) | |
# Need to reshape these | |
x = x.reshape(1,-1) |
digraph architecture { | |
rankdir=LR; | |
// Storage - #303F9F (dark blue) | |
node[fillcolor="#303F9F" style="filled" fontcolor="white"]; | |
database[label="DB"]; cache[label="Redis"]; | |
// Client-side Apps - #FFEB3B (yellow) | |
node[fillcolor="#FFEB3B" style="filled" fontcolor="black"]; | |
front_end[label="Front-end App"]; extension[label="Browser Extension"]; |
This fast tutorial will teach you how to install redis-cli
on AWS EC2 without having to install the whole Redis Server. Firstly, SSH into your EC2 instance and run the following command:
$ sudo yum install gcc
This may return an "already installed" message, but that's OK. After that, just run:
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make && sudo cp src/redis-cli /usr/local/bin/ && sudo chmod 755 /usr/local/bin/redis-cli
First, check the version of Ubuntu:
lsb_release -sc
You need to add the latest PostgreSQL repository for the latest version, otherwise It will install PostgreSQL 9.3. This is for trusty version.
sudo add-apt-repository "deb https://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"
Update and Install PostgreSQL 9.4:
NOTE: This is heavily outdated Gist snippet from 2017.
Another alternative to installing Go is to use a simple Bash script. It will download and install Go language under of your own user account.
Note that a system-wide installation might be better for some things