We'll be comparing the following:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See: https://github.com/cpursley/vecto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Application.put_env(:elixir, :ansi_enabled, true) | |
# IEx shell customization for color | |
# - Added as a comment: https://thinkingelixir.com/course/code-flow/module-1/pipe-operator/ | |
# - Original source: https://samuelmullen.com/articles/customizing_elixirs_iex/ | |
# - Can add to a specific project or can put in the User home folder as a global config. | |
# Updates from: | |
# - https://github.com/am-kantox/finitomata/blob/48e1b41b21f878e9720e6562ca34f1ce7238d810/examples/ecto_intergation/.iex.exs | |
timestamp = fn -> | |
{_date, {hour, minute, _second}} = :calendar.local_time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule CertChecker do | |
alias X509.Certificate, as: Cert | |
def check_file(file) do | |
[cert | chain] = read_pem_file(file) | |
check_certs(cert, chain) | |
end | |
def check_certs(cert, chain) do | |
cert_map = chain |> map_by_subject() |
VMWare Fusion 13 is now released. Read Vagrant and VMWare Fusion 13 Player on Apple M1 Pro for the latest.
This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use actix::prelude::*; | |
/// Define message | |
#[derive(Message)] | |
#[rtype(result = "Result<String, std::io::Error>")] | |
struct WhatsYourName; | |
#[derive(Message)] | |
#[rtype(result = "()")] | |
struct SetYourName { |
This repo is my experiment in deploying a basic Phoenix app using the
release
feature from elixir 1.9 (https://elixir-lang.org/blog/2019/06/24/elixir-v1-9-0-released/)
and docker, via a multi-stage Dockerfile (https://docs.docker.com/develop/develop-images/multistage-build/)
leveraging bitwalker's docker images for Elixir and Phoenix.
The simplest way to manage Elixir versions is to use asdf
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'aws-sdk' | |
require 'active_support' | |
require 'active_support/core_ext' | |
# http://docs.aws.amazon.com/sdkforruby/api/Aws/S3/Object.html#copy_to-instance_method | |
COPY_TO_OPTIONS = [:multipart_copy, :content_length, :copy_source_client, :copy_source_region, :acl, :cache_control, :content_disposition, :content_encoding, :content_language, :content_type, :copy_source_if_match, :copy_source_if_modified_since, :copy_source_if_none_match, :copy_source_if_unmodified_since, :expires, :grant_full_control, :grant_read, :grant_read_acp, :grant_write_acp, :metadata, :metadata_directive, :tagging_directive, :server_side_encryption, :storage_class, :website_redirect_location, :sse_customer_algorithm, :sse_customer_key, :sse_customer_key_md5, :ssekms_key_id, :copy_source_sse_customer_algorithm, :copy_source_sse_customer_key, :copy_source_sse_customer_key_md5, :request_payer, :tagging, :use_accelerate_endpoint] | |
Aws.config.update({ | |
region: 'us-east-1', | |
credentials: Aws::Credentials.new(AWS_ACCESS_KEY, AWS_SECRET_KEY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
child_pid = spawn "psrecord #{Process.pid} --plot plot_#{Time.now.strftime('%H_%M_%S')}.png" | |
a = [] | |
10_000_000.times { |i| a << i.to_s } | |
puts Process.kill('SIGINT', child_pid) | |
puts "continue scripting" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder