Skip to content

Instantly share code, notes, and snippets.

Jason Clark mithereal

  • {res,_}
Block or report user

Report or block mithereal

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 .Metrics.AudioConversionsLive.ex
defmodule ApiWeb.Metrics.AudioConversionsLive do
use Phoenix.LiveView
use ApiWeb.Live.AuthHelper, otp_app: :api
alias Api.Audio.File.Conversions
alias Phoenix.LiveView.Socket
def mount(%{"id" => id}, session, socket) do
socket = maybe_mount_user(socket, session)
View AudioConverter.Conversion.Server
defmodule AudioConverter.Conversion.Server do
use GenServer
require Logger
@lock_interval_seconds 10000
defstruct(
filesize: [],
source: nil,
destination: nil
@mithereal
mithereal / gist:464c3d4ed880b522d660ce471274d0b0
Created Jun 7, 2019
semantic versioning for elixir apps
View gist:464c3d4ed880b522d660ce471274d0b0
---
id: 7
title: "A simple way to automatically set the semantic version of your Elixir app"
date: 2019-06-07T07:47:32Z
layout: default
tags:
- elixir
- Phoenix
- Semver
- Version
@mithereal
mithereal / Makefile
Created Mar 26, 2019 — forked from xenogenesi/Makefile
create self signed certificates
View Makefile
DOMAIN ?= mydomain.com
COUNTRY := IT
STATE := IT
COMPANY := Evil Corp.
# credits to: https://gist.github.com/fntlnz/cf14feb5a46b2eda428e000157447309
# usage:
@mithereal
mithereal / phx_run.sh
Last active Dec 1, 2018
elixir phoenix init script for restarting from shell with ssl key generation and db reset
View phx_run.sh
#!/bin/bash
## place in the app root ie /
echo "This will reinit the db, create ssl keys and the main website"
PLATFORM_DIRECTORY=$(pwd)
PHOENIX_DIRECTORY="apps/api"
DB_DIRECTORY="apps/db"
View gist:0d7ba10a916f5800cf00fe8154716f5c
type location = {
street_number: string,
route: string,
locality: string,
administrative_area_level_1: string,
country: string,
postal_code: string
}
View gist:53142fbf18798dc8e7db0d503d880f49
type marshalled_location = {.
"administrative_area_level_1": string,
"country": string,
"locality": string, "postal_code": string,
"route": string,
"street_number": string
}
type input = {
key: string,
View gist:19ba87bda42aa5069147afb3d8942cd4
open Googleplaces
open AddressShared
module Encode = {
let location = (location: location) =>
Json.Encode.(
object_([
("administrative_area_level_1", string(location.administrative_area_level_1)),
("country", string(location.country)),
("locality", string(location.locality)),
View App.re
type webData('a) = RemoteData.t('a, 'a, string);
type language = {
name: option(string),
count:int
}
type repo = {
id: int,
owner: string,
@mithereal
mithereal / app.re
Last active Aug 30, 2018
bs prob reloaded
View app.re
type state =
| LOADING
| ERROR
| LOADED(string)
type searchType =
| ZIP
| LOCATION
You can’t perform that action at this time.