This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
defmodule MyAppWeb.ExampleLiveTest do | |
# `LiveviewCase` is a custom test helper - pretty much the same as ConnCase but with | |
# import Phoenix.LiveViewTest | |
# import MyApp.Support.AuthHelpers | |
use MyAppWeb.LiveviewCase, async: false | |
import MyApp.Factory | |
alias MyApp.Repo | |
alias MyAppWeb.ExampleLive |
LSB_RELEASE := $(shell lsb_release -cs) | |
WHOAMI := $(shell whoami) | |
SYSTEM := $(shell uname -s) | |
ARCH := $(shell uname -m) | |
NODE_VERSION := 14 | |
PHOENIX_VERSION := 1.5.8 | |
install-nodejs: | |
cd /tmp/ | |
curl -sL https://deb.nodesource.com/setup_$(NODE_VERSION).x -o nodesource_setup.sh |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
This an ordered version of the original gist located at https://gist.github.com/marcanuy/06cb00bc36033cd12875
@layer utilities { | |
.text-gradient { | |
background-clip: text; | |
-webkit-text-fill-color: transparent; | |
} | |
} |
# How to install the latests version of ruby | |
# 1. clone ruby/ruby | |
# 2. autoconf | |
# 3. ./configure | |
# 4. cd ext/openssl && ruby extconf.rb --with-openssl-dir=<openssl_root>; make; make install | |
# 5. cd ../../ | |
# 6. make | |
# 7. make install-nodoc | |
# You should be ready ti run this script!!!! |
defmodule StringTrimmer do | |
def trim_utf8(string, len), do: trim(string, len, &utf8_counter/1) | |
def trim_utf16(string, len), do: trim(string, len, &utf16_counter/1) | |
def trim(string, len, counter) do | |
string | |
|> String.graphemes() | |
|> Enum.reduce_while({0, ""}, fn grapheme, {count, acc} -> | |
count = count + counter.(grapheme) |
#!/bin/bash | |
### | |
### my-script — does one thing well | |
### | |
### Usage: | |
### my-script <input> <output> | |
### | |
### Options: | |
### <input> Input file to read. | |
### <output> Output file to write. Use '-' for stdout. |
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
# theming | |
code --install-extension emmanuelbeziat.vscode-great-icons | |
code --install-extension github.github-vscode-theme | |
# terminal | |
code --install-extension formulahendry.terminal | |
code --install-extension msamueltscott.maximizeterminal | |
# general stuff | |
code --install-extension vscodevim.vim |