Skip to content

Instantly share code, notes, and snippets.

View NduatiK's full-sized avatar

Nduati Kuria NduatiK

View GitHub Profile
@cigrainger
cigrainger / elixir_za.livmd
Created July 16, 2024 18:19
Elixir ZA: Boost your data team's productivity with Explorer
# Elixir ZA: Boost your data team's productivity with Explorer
```elixir
Mix.install(
[
{:explorer, "~> 0.8.3"},
{:kino, "~> 0.13.2"},
{:kino_vega_lite, "~> 0.1.13"},
{:kino_explorer, "~> 0.1.20"},
{:adbc, "~> 0.6.0"},
@caspg
caspg / 1_searchbar_live.ex
Last active February 23, 2025 13:52
Example of real-time search bar implementation in Phoenix LiveView and Tailwind. Working example on https://travelermap.net/parks/usa
defmodule TravelerWeb.SearchbarLive do
use TravelerWeb, :live_view
alias Phoenix.LiveView.JS
alias Traveler.Places
def mount(_params, _session, socket) do
socket = assign(socket, places: [])
{:ok, socket, layout: false}
end
@nikneroz
nikneroz / Guardian JWT.md
Last active October 10, 2023 19:13
Elixir + Phoenix Framework + Guardian + JWT. This is tutorial and step by step installation guide.

Elixir + Phoenix Framework + Guardian + JWT + Comeonin

Preparing environment

We need to generate secret key for development environment.

mix phoenix.gen.secret
# ednkXywWll1d2svDEpbA39R5kfkc9l96j0+u7A8MgKM+pbwbeDsuYB8MP2WUW1hf

Let's generate User model and controller.

@remen
remen / fun_with_kotlin_and_jackson.kt
Last active October 17, 2021 08:59
Fun with kotlin and jackson
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.KotlinModule
fun main(args: Array<String>) {
val jsonString : String = """
{
"authors" : [
{
"name" : "Kalle Jönsson",