Skip to content

Instantly share code, notes, and snippets.

View joshleecreates's full-sized avatar

Josh Lee joshleecreates

View GitHub Profile
@joshleecreates
joshleecreates / vm-profile.nix
Created September 4, 2024 03:33
NixOS VM Profile
{ config, pkgs, modulesPath, lib, system, ... }:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
config = {
#Provide a default hostname
networking.hostName = lib.mkDefault "base";
def process_url(url) do
defaults = %{
thing: "thing1value"
}
uri = URI.parse(url)
params = URI.decode_query(uri.query, defaults) |> URI.encode_query
URI.merge(@base_url, uri.path <> "?" <> params) |> to_string
end
@joshleecreates
joshleecreates / classification_helper.ex
Last active February 7, 2017 04:14
An elixir helper for classifying text
@doc """
Example Usage
```
items = [
%{
name: "thing",
description: "foo bar baz"
},
%{
name: "thing two",