Skip to content

Instantly share code, notes, and snippets.

View alvarolizama's full-sized avatar
🤖
Working at Resuelve

Alvaro Lizama alvarolizama

🤖
Working at Resuelve
View GitHub Profile
@oliverswitzer
oliverswitzer / bulk_rotate_video.exs
Created October 10, 2022 00:58
Simple elixir script to rotate mp4 video in bulk using ffmpeg
# Files need to be in same directory as this script
files = ["rotate_me_1", "rotate_me_2", "rotate_me_3"]
# Read more about rotating videos with ffmpeg here
# https://www.baeldung.com/linux/ffmpeg-rotate-video#:~:text=transpose%20is%20an%20FFmpeg%20filter,the%20values%20from%200%2D3.
# Run this from a new shell session to watch the progress of this script:
# `$ while true; do ps aux | grep ffmpeg; sleep 2; clear; done`
Task.async_stream(
@gvaughn
gvaughn / application.ex
Created November 23, 2018 17:18 — forked from cblavier/application.ex
Cowboy 2.5 proxy, used to bind a single port (on Heroku) for umbrella Phoenix applications. It supports HTTPS and websockets properly.
defmodule MasterProxy.Application do
alias MyApp.Endpoint, as: MyAppEndpoint
alias MyApp.UserSocket, as: MyAppUserSocket
alias MyOtherApp.Endpoint, as: MyOtherAppEndpoint
alias MyOtherApp.UserSocket, as: MyOtherAppUserSocket
alias Phoenix.LiveReloader.Socket, as: LiveReloadSocket
alias Plug.Cowboy
@jerel
jerel / seed.ex
Created December 19, 2016 15:48
Run seeds in an Elixir Distillery app
defmodule :release_tasks do
def seed do
:ok = Application.load(:myapp)
[:postgrex, :ecto, :logger]
|> Enum.each(&Application.ensure_all_started/1)
Myapp.Repo.start_link
@plamb
plamb / gce_auth.ex
Last active December 9, 2020 14:31
Authenticate with Google Cloud using service account json key and Elixir
# https://developers.google.com/identity/protocols/OAuth2ServiceAccount
key_json = File.read!("some-service-account-key-file.json")
key_map = JOSE.decode(key_json)
jwk = JOSE.JWK.from_pem(key_map["private_key"])
jws = %{"alg" => "RS256"}
header = %{
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active May 6, 2024 08:32
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@adamloving
adamloving / temporary-email-address-domains
Last active April 24, 2024 14:20
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com