Skip to content

Instantly share code, notes, and snippets.

View bigardone's full-sized avatar
🏠
Working from home

Ricardo García Vega bigardone

🏠
Working from home
View GitHub Profile
@MariaSolOs
MariaSolOs / builtin-compl.lua
Last active July 17, 2024 16:11
Built-in completion + snippet Neovim setup
---Utility for keymap creation.
---@param lhs string
---@param rhs string|function
---@param opts string|table
---@param mode? string|string[]
local function keymap(lhs, rhs, opts, mode)
opts = type(opts) == 'string' and { desc = opts }
or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr })
mode = mode or 'n'
vim.keymap.set(mode, lhs, rhs, opts)
@phortuin
phortuin / signing-git-commits.md
Last active July 15, 2024 08:53
Set up a GPG key for signing Git commits on MacOS (M1)

Based on this blogpost.

To sign Git commits, you need a gpg key. GPG stands for GNU Privacy Guard and is the de facto implementation of the OpenPGP message format. PGP stands for ‘Pretty Good Privacy’ and is a standard to sign and encrypt messages.

Setting up

Install with Homebrew:

$ brew install gpg
@opsb
opsb / elm-cache-add.sh
Last active November 4, 2021 18:43
Pulls all elm.json dependencies from github and saves in local cache (requires jq to be installed)
#!/bin/sh
set -e
if [ "$(elm --version)" != "0.19.1" ]; then
echo "Globally installed elm 0.19.1 is required"
exit 1
fi
export packages=~/.elm/0.19.1/packages
@JoelQ
JoelQ / elm-types-glossary.md
Last active June 26, 2024 03:05
Elm Type Glossary

Elm Types Glossary

There's a lot of type terminology and jargon going around when discussing types in Elm. This glossary attempts to list some of the most common type terms along with synonyms, terms from other language communities, examples, and links to more detailed articles on each topic.

@WebReflection
WebReflection / why-i-use-web-components.md
Last active December 5, 2023 17:47
Why I use web components

Why I use web components

This is some sort of answer to recent posts regarding Web Components, where more than a few misconceptions were delivered as fact.

Let's start by defining what we are talking about.

The Web Components Umbrella

As you can read in the dedicated GitHub page, Web Components is a group of features, where each feature works already by itself, and it doesn't need other features of the group to be already usable, or useful.

@josephan
josephan / setup_tailwind_in_phoenix.md
Last active August 8, 2023 05:50
Add Tailwind CSS to an Elixir/Phoenix Project with PurgeCSS
@paulfioravanti
paulfioravanti / Main.elm
Created December 27, 2018 03:07
Elm 0.19 Browser.Application starter
-- Adapted from https://gist.github.com/roine/a2da44f2047d494cabaf715f06a591db#file-4_application-elm
module Main exposing
( Flags
, Model
, Msg(..)
, Navigation
, Route(..)
, bodyView
, fromUrl
, init
@roine
roine / 0_README.md
Last active April 8, 2021 20:35
Bare minimum for Elm 0.19

From 0.19 Elm introduced 4 ways to boot an app:

  1. sandbox (no outside interaction)
  2. element (simple outside interaction - side effect, flags, subscriptions)
  3. document (same as above but with title tag control)
  4. application (whole SPA features)
@jswny
jswny / Flexible Dockerized Phoenix Deployments.md
Last active July 3, 2023 05:25
A guide to building and running zero-dependency Phoenix (Elixir) deployments with Docker. Works with Phoenix 1.2 and 1.3.

Prelude

I. Preface and Motivation

This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.

For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai