I hereby claim:
- I am bratsche on github.
- I am bratsche (https://keybase.io/bratsche) on keybase.
- I have a public key ASB1iVAvshnnFu_8fyzVI-1OBhcehQUwyy_ScHu7enY-TAo
To claim this, I am signing this object:
| Notes on why I think Elixir is worth using for us | |
| * Phoenix Channels - able to support 2 million concurrent clients on a single server. | |
| * Node.js has an equivalent feature called SocketIO | |
| * Ruby on Rails has an equivalent feature called ActionCable | |
| * Not aware of any similar feature in Python | |
| * Concurrency | |
| * Ruby, restricted by a GIL | |
| * Python, restricted by a GIL, but there is a proposal to remove it. Not sure how long it will take to remove it. | |
| * Node.js, single-threaded async |
| defmodule ExperimentsWeb.ComposerLive.Index do | |
| use ExperimentsWeb, :live_view | |
| import ExperimentsWeb.ComposerLive.Table | |
| alias Experiments.Composers | |
| alias Experiments.Composers.Composer | |
| @impl true | |
| def mount(_params, _session, socket) do |
I hereby claim:
To claim this, I am signing this object:
| git ls-files | while read -r line; do | |
| s=$(git status -s "$line"); | |
| if [ -n "$s" ]; then | |
| echo "$s"; | |
| else | |
| echo " $line"; | |
| fi; | |
| done |
| defmodule Foo.SessionController do | |
| use Foo.Web, :controller | |
| def create(conn, %{"session" => session_params}) do | |
| case Foo.Session.authenticate(session_params) do | |
| {:ok, user} -> | |
| {:ok, jwt, _full_claims} = Guardian.encode_and_sign(user, :token) | |
| conn | |
| |> put_status(:created) |
| module Main (..) where | |
| import Effects exposing (Effects, Never, none) | |
| import Json.Decode as Json | |
| import Html exposing (..) | |
| import Html.Attributes exposing (..) | |
| import Html.Events exposing (..) | |
| import String | |
| import StartApp | |
| import Signal exposing (Address) |
| public void SetSortFunc(int sort_column_id, Gtk.TreeIterCompareFunc sort_func) { | |
| GtkSharp.TreeIterCompareFuncWrapper sort_func_wrapper = new GtkSharp.TreeIterCompareFuncWrapper (sort_func); | |
| IntPtr user_data; | |
| GLib.DestroyNotify destroy; | |
| if (sort_func == null) { | |
| user_data = IntPtr.Zero; | |
| destroy = null; | |
| } else { | |
| user_data = (IntPtr) GCHandle.Alloc (sort_func_wrapper); | |
| destroy = GLib.DestroyHelper.NotifyHandler; |
| # lib/mix/tasks/musikr.seed.ex | |
| defmodule Mix.Tasks.Musikr.Seed do | |
| use Mix.Task | |
| @shortdoc "Seeds the database" | |
| @moduledoc """ | |
| Seed the database using the file 'priv/repo/seeds.exs' | |
| """ |
| --- a/src/win32/cairo-win32-font.c | |
| +++ b/src/win32/cairo-win32-font.c | |
| @@ -379,6 +379,8 @@ _win32_scaled_font_create (LOGFONTW *logfont, | |
| /* don't delete the hfont if we're using the one passed in to us */ | |
| f->delete_scaled_hfont = !f->scaled_hfont; | |
| + cairo_matrix_scale (font_matrix, 1.0 / device_scale, 1.0 / device_scale); | |
| + cairo_matrix_scale (ctm, device_scale, device_scale); | |
| cairo_matrix_multiply (&scale, font_matrix, ctm); | |
| status = _compute_transform (f, &scale); |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <limits.h> | |
| #include <string.h> | |
| #include <sys/stat.h> | |
| #include <stdio.h> | |
| /* Don't get link errors because mkdir is redefined to rpl_mkdir. */ | |
| #undef mkdir |