Skip to content

Instantly share code, notes, and snippets.

View gmcintire's full-sized avatar
:shipit:

Graham McIntire gmcintire

:shipit:
View GitHub Profile
@astutecat
astutecat / create-darwin-volume.sh
Last active September 16, 2024 12:44
Notes on setting up Nix on MacOS.
#!/bin/sh
set -e
root_disk() {
diskutil info -plist /
}
apfs_volumes_for() {
disk=$1
diskutil apfs list -plist "$disk"
@JoelQ
JoelQ / elm-types-glossary.md
Last active March 30, 2025 21:26
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.

@fernandoaleman
fernandoaleman / mysql2-mojave.md
Last active February 7, 2024 19:19
Install mysql2 on MacOS Mojave

For MacOS Catalina, visit Install mysql2 on MacOS Catalina

Problem

Installing mysql2 gem errors on MacOS Mojave.

Solution

Make sure openssl is installed on Mac via Homebrew.

@teamon
teamon / Dockerfile
Created August 31, 2018 10:28
elixir + phoenix + node dockerfile
########################################
# 1. Build nodejs frontend
########################################
FROM node:10.9-alpine as build-node
# prepare build dir
RUN mkdir -p /app/assets
WORKDIR /app
# set build ENV
@noelbundick
noelbundick / LICENSE
Last active August 30, 2024 18:59
Solarized Dark for Bash on Windows
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@chrismccord
chrismccord / upgrade.md
Last active April 7, 2023 12:03
Phoenix 1.2.x to 1.3.0 Upgrade Instructions

If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8

To use the new phx.new project generator, you can install the archive with the following command:

$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

Bump your phoenix dep

Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs:

@ntrepid8
ntrepid8 / gen_server_tpl.ex
Created November 2, 2016 16:06
Elixir GenServer Template
defmodule GenServerTpl do
@moduledoc """
A GenServer template for a "singleton" process.
"""
use GenServer
# Initialization
def start_link(opts \\ []) do
GenServer.start_link(__MODULE__, opts, [name: __MODULE__])
end
@glennsarti
glennsarti / Fresh Ubutnu 14.04
Last active October 20, 2018 01:56
Installing Ruby for puppet windows devs on WSL on Win10
sudo apt-get install -y build-essential git libreadline-dev
sudo apt-get install -y libssl-dev zlib1g-dev
sudo apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
sudo apt-get install -y ruby1.9.1-dev zlib1g-dev
sudo apt-get install -y autoconf
sudo apt-get install -y libicu-dev
@col
col / Deploy a Phoenix app with Dokku.md
Last active March 28, 2025 04:03
Deploy a Phoenix app with Dokku
@col
col / readme.md
Last active November 28, 2017 22:53
Config Phoenix App For Dokku Deploy

Config Phoenix App For Dokku Deploy

  1. Set the hostname via an environment variable in prod.exs
  • url: [host: System.get_env("HOSTNAME"), port: 80],
  1. Set the secret key base via an environment variable in prod.secret.exs
  • secret_key_base: System.get_env("SECRET_KEY_BASE")
  1. Set the database connection url via an environment variable in prod.secret.exs
  • url: System.get_env("DATABASE_URL"),