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
@adns44
adns44 / eco-server-order-on-ovhcloud-api.md
Last active November 27, 2025 10:32
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 wrote this tutorial in 2024 and since this it is very popular on the LET Kimsufi topic, I make a few changes to help to understand better how the API works behind the scenes.

There are many APPs that helps you to order machines with OVH API automatable so when you understand the steps, you can use all of them as a pro.

And let me to say thanks to everyone who mention me and my tutorial on the forum.

I ASK YOU IN FIRST

import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
@chibatching
chibatching / FlowThrottleDebounce.kt
Last active November 8, 2024 00:44
Throttle and Debounce on Flow Kotlin Coroutines
fun <T> Flow<T>.throttle(waitMillis: Int) = flow {
coroutineScope {
val context = coroutineContext
var nextMillis = 0L
var delayPost: Deferred<Unit>? = null
collect {
val current = SystemClock.uptimeMillis()
if (nextMillis < current) {
nextMillis = current + waitMillis
@filipkowicz
filipkowicz / HeaderItemDecoration.kt
Last active August 20, 2025 04:40
Item Decorator for sticky headers in Kotlin
package com.filipkowicz.headeritemdecorator
/*
solution based on - based on Sevastyan answer on StackOverflow
changes:
- take to account views offsets
- transformed to Kotlin
- now works on viewHolders
@NoahZu
NoahZu / FrescoUtils.java
Created November 25, 2016 06:52
Fresco根据url获取Bitmap
/**
* 根据url获取图片
*/
private void getShareBitmap() {
ImageRequest request = ImageRequest.fromUri(type == 3 ? shateImageUrl : getCover(mLiveBean));
ImagePipeline imagePipeline = Fresco.getImagePipeline();
DataSource dataSource = imagePipeline.fetchDecodedImage(request, context);
try {
dataSource.subscribe(new BaseBitmapDataSubscriber() {
@Override
@granoeste
granoeste / EachDirectoryPath.md
Last active January 5, 2026 16:57
[Android] How to get the each directory path.

System directories

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

External storage directories