Skip to content

Instantly share code, notes, and snippets.

View yeongsheng-tan's full-sized avatar

Tan Yeong Sheng yeongsheng-tan

View GitHub Profile

Nix Flake MVP

Goals

  • To provide Nix repositories with an easy and standard way to reference other Nix repositories.

  • To allow such references to be queried and updated automatically.

  • To provide a replacement for nix-channel, NIX_PATH and Hydra

@bobvanderlinden
bobvanderlinden / rails_in_nix-shell.md
Last active March 10, 2023 03:13
Running Rails through nix-shell

Use the following to generate gemset.nix:

nix run nixpkgs.bundix --command bundix

Then run:

nix-shell
@hjertnes
hjertnes / doom.txt
Created April 6, 2018 08:28
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@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

## This is a list of RPM packages available on AWS Lambda, Node.js 8.10 runtime, 22 May 2019, Amazon Linux 2018.03
## See https://github.com/claudiajs/lambda-vm-info for how this list was generated and to get an updated version
Installed Packages
ImageMagick.x86_64 6.7.8.9-15.21.amzn1 @amzn-main
alsa-lib.x86_64 1.0.22-3.9.amzn1 @amzn-main
audit-libs.x86_64 2.6.5-3.28.amzn1 @amzn-main
avahi-libs.x86_64 0.6.25-12.17.amzn1 @amzn-main
basesystem.noarch 10.0-4.9.amzn1 @amzn-main
@theaspect
theaspect / assignment1.erl
Last active May 13, 2020 08:46
Functional Erlang Assignment 1
-module(assignment1).
-include_lib("eunit/include/eunit.hrl").
-export([hypotenuse/2, area/1, perimeter/1, enclose/1, bits/1, bits_tail/1]).
% You can run test with:
% c(assignment1).
% assignment1:test().
% Available shapes:
% {circle, {X,Y}, R}
@onimenotsuki
onimenotsuki / .spacemacs.el
Last active September 28, 2022 04:42
My personal configuration of emacs with spacemacs https://github.com/syl20bnr/spacemacs/
;; -*- mode: emacs-lisp -*-
;; This file is loaded by SmTnpacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@coreyhaines
coreyhaines / Editable.elm
Last active August 25, 2022 05:11
type Editable
module Editable exposing (..)
type Editable ofType
= NotEditing { value : ofType }
| Editing { originalValue : ofType, buffer : ofType }
value : Editable ofType -> ofType
value editable =
@lnmunhoz
lnmunhoz / fizzbuzz.md
Last active July 2, 2017 01:23
Coding Dojo - 29/10/2016

#Fizz Buzz

  • weslley39
  • lnmunhoz

##Elixir

defmodule FizzBuzz do
  def run(n) when (rem(n, 3) == 0) and (rem(n, 5) == 0) do
    IO.puts("FizzBuzz")