Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Rosiek rrosiek

View GitHub Profile
View mp4box.ex
defmodule Media.Mp4 do
def parse(file_path) do
Stream.resource(fn -> open_file(file_path) end, &read_next/1, &close_file/1)
|> Enum.to_list()
|> Enum.filter(&(&1 != nil))
|> List.first()
|> seek_gpmf
end
defp open_file(file_path) do
@rrosiek
rrosiek / .eslintrc.yml
Created Jan 3, 2021
ESLint configuration
View .eslintrc.yml
env:
browser: true
es2020: true
plugins:
- fp
- promise
- svelte3
overrides:
@rrosiek
rrosiek / install_mysql.sh
Last active Apr 10, 2021
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Tested with Ubuntu 16.04.
View install_mysql.sh
#! /usr/bin/env bash
###
#
# install_mysql.sh
#
# This script assumes your Vagrantfile has been configured to map the root of
# your application to /vagrant and that your web root is the "public" folder
# (Laravel standard). Standard and error output is sent to
# /vagrant/vm_build.log during provisioning.