Mix.install([
{:kino, "~> 0.6.2"},
{:kino_vega_lite, "~> 0.1.1"},
{:ecto, "~> 3.8"},
{:libgraph, "~> 0.16.0"}
])
So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.
-
Database in a browser, a spec (Stepan Parunashvili)
What problem are we trying to solve with a sync system?
-
The web of tomorrow (Nikita Prokopov)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rails production setup via SQLite3 made durable by https://litestream.io/ | |
# Copy this to Dockerfile on a fresh rails app. Deploy to fly.io or any other container engine. | |
# | |
# try locally: docker build . -t rails && docker run -p3000:3000 -it rails | |
# | |
# in production you might want to map /data to somewhere on the host, | |
# but you don't have to! | |
# | |
FROM ruby:3.0.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for an example of a suggested `locals_without_parens`, see z_locals_without_parens.exs | |
# parsing and expanding a formatter.exs file would be a good route too | |
opts = [sourceror_opts: [locals_without_parens: [...], line_length: 122]] | |
for transformation <- [&PipeChainStart.run/1, &SinglePipe.run/1] do | |
ProjTraversal.transform("../my_codebase/", transformation, opts) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Replace "your_schema" with whatever schema is appropriate in your environment. | |
It is possible to use "public"... but you shouldn't! | |
*/ | |
/* | |
Function to stamp a "modified" timestamp. Adjust the name to suit your environment, | |
but that name is hard-coded so it is assumed that you only use _one_ such name. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyMacro do | |
defmacro @{name, _meta, [arg]} do | |
IO.inspect "Your #{name} is a #{arg}" | |
end | |
defmacro __using__(_) do | |
quote do | |
import Kernel, except: [@: 1] | |
import unquote(__MODULE__) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule HeroiconWithSurface do | |
@moduledoc """ | |
This assumes https://github.com/tailwindlabs/heroicons has been cloned as a submodule to svgs/heroicons | |
Examples: | |
<#HeroiconWithSurface variant="outline" icon="phone" class="w-5 h-5" /> | |
<%= HeroiconWithSurface.svg({"outline", "phone"}, class: "w-5 h-5") %> | |
""" | |
use SvgIcons, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Elixir CI | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: |
I got to here after spending hours trying to deploy to an Elastic Beanstalk instance via CircleCi 2.0 so I thought I'd write up what worked for me to hopefully help others. Shout out to RobertoSchneiders who's steps for getting it to work with CircleCi 1.0 were my starting point.
For the record, I'm not the most server-savvy of developers so there may be a better way of doing this.