Skip to content

Instantly share code, notes, and snippets.

Avatar

Adrian Philipp adri

View GitHub Profile
@stevedomin
stevedomin / create_post.exs
Last active Sep 22, 2022
Using UUIDs as primary key with Ecto
View create_post.exs
defmodule MyBlog.Repo.Migrations.CreatePost do
use Ecto.Migration
def change do
create table(:posts, primary_key: false) do
add :id, :uuid, primary_key: true
add :body, :string
add :word_count, :integer
timestamps
@staltz
staltz / introrx.md
Last active Dec 2, 2022
The introduction to Reactive Programming you've been missing
View introrx.md
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active Nov 10, 2022
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!
View whiteboardCleaner.md

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@ndarville
ndarville / business-models.md
Last active Nov 6, 2022
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.
View business-models.md

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google