Skip to content

Instantly share code, notes, and snippets.

View VibeMage's full-sized avatar
🏠
Working from home

VibeMage VibeMage

🏠
Working from home
View GitHub Profile
@VibeMage
VibeMage / paster-support.md
Created September 2, 2026 02:17
Paster Support

Paster Support / 支持与帮助

English

Paster is an open-source clipboard manager for macOS.

  • Press ⇧⌘V to open the clipboard panel. Type to search, press Return to paste.
  • Auto-paste requires Accessibility permission: System Settings → Privacy & Security → Accessibility → enable Paster. Without it, selecting an item simply copies it.
  • Sync: choose any shared folder (e.g. inside iCloud Drive) in Settings → Sync.
  • All data stays on your Mac. No account, no telemetry, no network requests.
@VibeMage
VibeMage / PRIVACY.md
Last active September 15, 2026 08:43
Copyo (formerly Paster) Privacy Policy

Privacy Policy / 隐私政策

Effective date / 生效日期: 2026-09-01

English

Copyo (formerly Paster) does not collect, transmit, or sell any data. Period.

  • Clipboard history is stored only on your Mac (and, if you enable sync, in a folder you choose — such as your own iCloud Drive). It never touches our servers,
@VibeMage
VibeMage / eco-server-order-on-ovhcloud-api.md
Created November 8, 2024 23:44 — forked from adns44/eco-server-order-on-ovhcloud-api.md
Eco server order process with OVHcloud API step-by-step

OVH - How to use the API to order any server? The answer is here!

I ASK YOU IN FIRST

This process is automateable. I'll write the know-how, how to do it. I kindly ask you! Do NOT ABUSE it! Please keep the oportunity to order limited edition servers for other ones!

How the OVH API works?

First of all, OVH provides API libraries to access the API. And for this too, they have an API console where you can try it. For now, we'll see the API console. We'll place an older. Lets go!

@VibeMage
VibeMage / once.kt
Last active March 1, 2023 16:31
the method executed only once
import kotlinx.coroutines.*
val myData by lazy(LazyThreadSafetyMode.NONE) {
loadDataFromNetwork()
}
suspend fun loadDataFromNetwork(): MyData {
// 模拟网络请求
delay(1000)
return MyData(/* ... */)
@VibeMage
VibeMage / CountDownCoroutines.kt
Created June 16, 2022 14:56
CountDown Coroutines
fun countDownCoroutines(
total: Int,
scope: CoroutineScope,
onTick: (Int) -> Unit,
onStart: (() -> Unit)? = null,
onFinish: (() -> Unit)? = null,
): Job {
return flow {
for (i in total downTo 0) {
emit(i)
@VibeMage
VibeMage / CallToObservable.java
Created March 3, 2020 07:23
[Retrofit Call to Observable]#Android
public static <T extends ApiResponse> Observable<T> CallToObservable(Call<T> originalCall) {
return Observable.<T>create(subscriber -> {
Call<T> call = originalCall.clone();
CallArbiter<T> arbiter = new CallArbiter<>(call, subscriber);
subscriber.add(arbiter);
subscriber.setProducer(arbiter);
Response<T> response;
try {
response = call.execute();
if (!response.isSuccessful()) {
@VibeMage
VibeMage / DisableableAppBarLayoutBehavior.java
Created March 3, 2020 03:27
[disable/re-enable the expansion CoordinatorLayout behavior]#Android
public class DisableableAppBarLayoutBehavior extends AppBarLayout.Behavior {
private boolean mEnabled;
public DisableableAppBarLayoutBehavior() {
super();
}
public DisableableAppBarLayoutBehavior(Context context, AttributeSet attrs) {
super(context, attrs);
}
@VibeMage
VibeMage / expand-collapse.java
Created February 14, 2020 09:04 — forked from ZkHaider/expand-collapse.java
Simple Expand / Collapse RecyclerView Item
public static class ExampleViewHolder extends RecyclerView.ViewHolder
implements View.OnClickListener {
private int originalHeight = 0;
private boolean isViewExpanded = false;
private YourCustomView yourCustomView
public ExampleViewHolder(View v) {
super(v);
v.setOnClickListener(this);
@VibeMage
VibeMage / Android @IntDef.java
Last active January 17, 2020 03:36
[@IntDef replace enum]#Android
@IntDef({Status.IDLE, Status.PROCESSING, Status.DONE, Status.CANCELLED})
@Retention(RetentionPolicy.SOURCE)
@interface Status {
int IDLE = 0;
int PROCESSING = 1;
int DONE = 2;
int CANCELLED = 3;
}
@VibeMage
VibeMage / EachDirectoryPath.md
Last active January 17, 2020 03:35 — forked from granoeste/EachDirectoryPath.md
[Get the each directory path] #Android

System directories

Method Result
Environment.getDataDirectory() /data
Environment.getDownloadCacheDirectory() /cache
Environment.getRootDirectory() /system

External storage directories