Skip to content

Instantly share code, notes, and snippets.

View sdomino's full-sized avatar

Steve Domino sdomino

View GitHub Profile
@sdomino
sdomino / mix.exs
Created November 18, 2019 23:30
messenger/mix.exs
defp deps do
[
{:broadway_sqs, "~> 0.4.0"},
{:broadway, "~> 0.4.0"},
{:ex_aws_s3, "~> 2.0"},
{:ex_aws_sns, "~> 2.0"},
{:ex_aws_sqs, "~> 3.0"},
{:ex_aws, "~> 2.1"},
{:hackney, "~> 1.9"},
{:poison, "~> 3.1"}
@sdomino
sdomino / mapping.json
Created October 31, 2019 14:26
pdfer/lib/mapping.json
{"location": "World"}
@sdomino
sdomino / template.html
Created October 31, 2019 14:25
pdfer/lib/template.html
<html>
<body>
<h1>Hello {{ location }}</h1>
</body>
</html>
@sdomino
sdomino / pdfer.ex
Last active October 31, 2019 15:25
pdfer/lib/pdfer.ex
defmodule Pdfer do
@moduledoc """
Documentation for Pdfer.
"""
#
def generate(pdf_path, template_path, mapping_path) do
mapping = Jason.decode!(read_file(mapping_path))
template = read_file(template_path)
@sdomino
sdomino / mix.exs
Last active October 30, 2019 23:04
pdfer/mix.exs dependencies
defp deps do
[
{:bbmustache, github: "soranoba/bbmustache"},
{:jason, "~> 1.1"},
{:pdf_generator, ">=0.5.5"}
]
end
@sdomino
sdomino / boxfile.yml
Last active January 16, 2019 08:34
An example boxfile.yml, configured to run Discourse with Nanobox (nanboox.io)
run.config:
engine: ruby
extra_packages:
- git
- nodejs
- nginx
- ImageMagick
- optipng
- jpegoptim
- gifsicle
@sdomino
sdomino / discorse.conf
Last active July 13, 2017 00:01
An example discourse.conf file, configured to work with Nanobox (nanobox.io).
#
# DO NOT EDIT THIS FILE
# If you need to make changes create a file called discourse.conf in this directory with your changes
# On import this file will be imported using ERB
#
# Discourse supports multiple mechanisms for production config.
#
# 1. You can do nothing and get these defaults (not recommended, you should at least set hostname)
# 2. You can copy this file to config/discourse.conf and amend with your settings
# boxfile.yml
run.config:
engine: ruby
# add extra packages
extra_packages:
- nodejs
- nginx
#
package commands
import (
"fmt"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
var (
package main
import (
"fmt"
"os"
"github.com/nanopack/hoarder/commands"
)
//