Skip to content

Instantly share code, notes, and snippets.

Michael mazz

Block or report user

Report or block mazz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View file.ex
routes chunk:
```
# ---- Pipelines ----
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
@mazz
mazz / stuff.ex
Created Feb 20, 2019
Phoenix.Template.UndefinedError
View stuff.ex
Phoenix.Template.UndefinedError at GET /
Could not render "app.html" for WordApi.LayoutView, please define a matching clause for render/2 or define a template at "lib/faithful_word_api/templates/layout". No templates were compiled for this module. Assigns:
%{__phx_template_not_found__: WordApi.LayoutView, conn: %Plug.Conn{adapter: {Plug.Cowboy.Conn, :...}, assigns: %{layout: {WordApi.LayoutView, "app.html"}}, before_send: [#Function<0.116269836/1 in Plug.CSRFProtection.call/2>, #Function<2.65282597/1 in Phoenix.Controller.fetch_flash/2>, #Function<0.58261320/1 in Plug.Session.before_send/2>, #Function<1.112466771/1 in Plug.Logger.call/2>, #Function<0.66982185/1 in Phoenix.LiveReloader.before_send_inject_reloader/2>], body_params: %{}, cookies: %{"cookieconsent_status" => "dismiss"}, halted: false, host: "localhost", method: "GET", owner: #PID<0.736.0>, params: %{}, path_info: [], path_params: %{}, port: 4000, private: %{WordApi.Router => {[], %{}}, :phoenix_action => :index, :phoenix_controller => WordApi.Pa
View query.ex
Ecto.Query.from(fer in Transfer,
join: tn in Transaction,
where: fer.transaction_id == tn.id,
order_by: tn.absolute_id,
select: %{title: tn.basename, localizedTitle: fer.localizedname, uuid: tn.uuid, languageId: fer.language_id})
|> Repo.all
View sphinx.conf.mysql
#
# Sphinx configuration file sample
#
# WARNING! While this sample file mentions all available options,
# it contains (very) short helper descriptions only. Please refer to
# doc/sphinx.html for details.
#
#############################################################################
## data source definition
@mazz
mazz / docker-compose.yml
Last active Nov 19, 2018
phoenix project with traefik
View docker-compose.yml
# https://docs.docker.com/compose/compose-file/
version: '3.7'
services:
app_name:
build: .
depends_on:
- postgres
environment:
DATABASE_URL: ecto://app_name:app_name@postgres/app_name
HOSTNAME: localhost
View .env
HOST=localhost
DATABASE_URL=ecto://nevermind:nevermind@olivetree-db/olivetree_prod?pool_size=15
PORT=5000
POSTGRES_USER=nevermind
POSTGRES_PASSWORD=nevermind
POSTGRES_DB=olivetree_prod
POSTGRES_HOST=postgres
View release_tasks.ex
defmodule Olivetree.ReleaseTasks do
@start_apps [
:crypto,
:ssl,
:postgrex,
:ecto
]
def olivetree, do: Application.get_application(__MODULE__)
View rxcode.swift
// setup sharing button and UIActivityViewController
// once the download finishes
downloadingViewModel.fileDownloadCompleteEvent.asObservable()
.observeOn(MainScheduler.instance)
.subscribe({ download in
self.fullDownloadButton.rx.tap
.bind {
// copy file to temp dir to rename it
if let localDownload = self.downloadingViewModel.fileDownload.value {
let activityViewController = UIActivityViewController(activityItems: [UIImage(named: "FWBCLogo")!, "Shared via the Faithful Word App: https://faithfulwordapp.com/", localDownload.localUrl], applicationActivities: nil)
View _config.scss
$info: darken(#328cc1, 20%);
$primary: #083c5d;
$primary-light: #328cc1;
$navbar_color: #083c5d;
@mazz
mazz / README.md
Created Sep 21, 2018 — forked from Luzifer/README.md
Running docker-compose as a systemd service
View README.md

Running docker-compose as a systemd service

Files

File Purpose
/etc/compose/docker-compose.yml Compose file describing what to deploy
/etc/systemd/system/docker-compose.service Service unit to start and manage docker compose
/etc/systemd/system/docker-compose-reload.service Executing unit to trigger reload on docker-compose.service
/etc/systemd/system/docker-compose-reload.timer Timer unit to plan the reloads
You can’t perform that action at this time.