Skip to content

Instantly share code, notes, and snippets.

View linjunpop's full-sized avatar
🐚
Sleeping

Jun Lin linjunpop

🐚
Sleeping
View GitHub Profile
@linjunpop
linjunpop / ollama.ex
Last active October 17, 2023 02:56
Ollama API in Elixir
Mix.install(
[
{:finch, "~> 0.16.0"},
{:jason, "~> 1.4"}
],
)
Finch.start_link(name: OllamaFinch)
@linjunpop
linjunpop / README.md
Created February 9, 2022 07:58
obsidian-progress taste

Test for the obsidian-progress

@linjunpop
linjunpop / OTPTestCodes.md
Created October 14, 2021 07:26 — forked from kcramer/OTPTestCodes.md
OTP Test Codes

OTP Test Codes

Sample OTP QR Codes

The following sample codes are not valid for the listed services but should allow basic testing of an authenticator application. Clicking on a QR code image will display just that code so it is easier to scan without interference from the other codes.

You can use this site to generate more QR codes as needed. It will also let you verify the produced codes against its own calculated code.

@linjunpop
linjunpop / concat.ex
Last active May 30, 2021 11:14
obsidian-gist-taste
defmodule Concat do
def join(a, b) do
IO.puts "***First join"
a <> b
end
def join(a, b, sep \\ " ") do
IO.puts "***Second join"
a <> sep <> b
end
@linjunpop
linjunpop / fetcher.ex
Created December 25, 2018 15:17
Building A continues data processing system
defmodule Archiver.Fetcher do
use GenStage
def start_link(args) do
GenStage.start_link(__MODULE__, args, name: __MODULE__)
end
def init(state), do: {:producer, state}
def handle_demand(demand, state) do
@linjunpop
linjunpop / otp_build_21.0.log_1
Last active June 19, 2018 23:34
asdf install erlang 21.0 log
=== running autoconf in lib
=== running autoconf in lib/common_test
=== running autoconf in lib/erl_interface
=== running autoheader in lib/erl_interface
=== running autoconf in lib/megaco
@linjunpop
linjunpop / keybase.md
Created September 30, 2016 03:52
keybase.md

Keybase proof

I hereby claim:

  • I am linjunpop on github.
  • I am linjunpop (https://keybase.io/linjunpop) on keybase.
  • I have a public key ASBgsLXQTvVJBDcDHjRy6_zR49fhb-UOQ176oCPzQEK3nAo

To claim this, I am signing this object:

@linjunpop
linjunpop / qiniu-afnetworking.m
Last active August 29, 2015 14:19
UIImage 加载七牛图片,Retina 支持
#import "UIImageView+Qiniu.h"
#import <UIImageView+AFNetworking.h>
@implementation UIImageView (Qiniu)
- (void)qiniu_setImageWithURL:(NSURL *)url {
NSURLComponents *components = [[NSURLComponents alloc] initWithURL:url resolvingAgainstBaseURL:NO];
CGFloat scale = [[UIScreen mainScreen] scale];
Verifying that +linjunpop is my openname (Bitcoin username). https://onename.io/linjunpop