Skip to content

Instantly share code, notes, and snippets.

Rajan Tiwari trojanh

Block or report user

Report or block trojanh

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
trojanh / Transformer.ex
Last active Aug 6, 2018
Create Image thumbnail using ImageMagick in Elixir
View Transformer.ex
defmodule Image.Transformer do
def transform(original_file, operation \\ "convert") do
thumb_path = generate_thumb_file(original_file)
System.cmd(operation, operation_commands(original_file_path, thumb_path))
defp generate_thumb_file(original_file) do
View Bot.ex
defmodule MyApp.Bot do
use Application
use GenServer
alias MyApp.{Repo, BotSetting}
import Logger
def start(_, state), do: {:ok, state}
def start_link do
GenServer.start_link(__MODULE__, [:ok], name: __MODULE__)
You can’t perform that action at this time.