Skip to content

Instantly share code, notes, and snippets.

Mix.install([
{:ortex, "== 0.1.9"},
:req,
{:nx, "== 0.7.0"},
{:membrane_core, "~> 1.0"},
{:membrane_file_plugin, "~> 0.17.0"},
{:membrane_portaudio_plugin, "~> 0.19.2"},
{:membrane_ffmpeg_swresample_plugin, "~> 0.20.2"},
{:membrane_mp3_mad_plugin, "~> 0.18.3"},
{:membrane_mp3_lame_plugin, "~> 0.18.2"}
@watsy0007
watsy0007 / bst.ex
Last active November 11, 2024 08:47
elixir binary search tree
defmodule Tree do
@type item :: any()
@type t :: %__MODULE__{l: t() | nil, v: item(), r: t() | nil}
defstruct [l: nil, v: nil, r: nil]
def new(v \\ nil), do: %__MODULE__{v: v}
@spec member(t(), item()) :: bool()
# cmd - return : /Applications/WezTerm.app/Contents/MacOS/wezterm
#
# Navigation
lalt - h : yabai -m window --focus west
lalt - l : yabai -m window --focus east
lalt - k : yabai -m window --focus north
lalt - j : yabai -m window --focus south
# Moving windows
#!/usr/bin/env sh
# global settings
yabai -m config \
external_bar off:40:0 \
menubar_opacity 1.0 \
mouse_follows_focus off \
focus_follows_mouse off \
window_origin_display default \
window_placement second_child \
@watsy0007
watsy0007 / periodic_worker.ex
Created October 15, 2022 16:49
elixir periodically
defmodule PeriodicWorker do
use GenServer
@impl true
def init(period_in_millis) do
# The `{:continue, :init}` tuple here instructs OTP to run `handle_continue`
# which in this case will fire the first `:do_stuff` message so the worker
# does its job once and then schedules itself to run again in the future.
# Without this you'd have to manually fire the message to the worker
# when your app starts.
@watsy0007
watsy0007 / doris_test.livemd
Created September 1, 2022 10:25
apache doris demo

Untitled notebook

Mix.install([
  {:kino_db, "~> 0.1.2"},
  {:myxql, github: "watsy0007/myxql", ref: "4510f6c", override: true}
])

Section

elixir livebook demo

Mix.install([
  {:websockex, "~> 0.4.3"},
  {:jason, "~> 1.3"},
  {:kino, "~> 0.6.2"},
  {:kino_vega_lite, "~> 0.1.3"},
  {:contex, "~> 0.4.0"}
])
@watsy0007
watsy0007 / yandex.livemd
Last active December 9, 2021 09:50
yandex livebook

yandex邮箱注册

安装依赖

Mix.install([
  # https://github.com/edgurgel/httpoison
  {:httpoison, "~> 1.8"},
  # https://github.com/devinus/poison
  {:poison, "~> 5.0"},
@watsy0007
watsy0007 / yandex 企业域名使用方案.md
Last active December 7, 2021 09:32
yandex 企业域名使用方案

web版登陆

  1. 登陆地址:https://mail.yandex.com/
  2. 输入对应的账号密码登陆

注意: 账号需要带上 @kingdata.com

注意:如果是俄文,可以通过切换,换成英文界面

登陆界面

  • 什么是Git?

    • 分布式 版本控制系统
  • Git的基础概念

    • 本地&远程

      • 本地 工作区与暂存区
        • git add
        • git commit
  • 远程