keepassEnv.shis linux-compatible (also git bash for windows works)keepassEnv.batis windows-compatible (could be improved)keepassCheckout.shis linux-compatible and allow to read multiple files in one shoot
each script may be self-documented
| /** | |
| * source: https://gist.github.com/boly38/b3b41ad48c41a9e58dde577e39a0d48f | |
| * This NodeJs example file is an autonomous script | |
| * that query betterstack telemetry api (historically called logtail) | |
| * https://betterstack.com/docs/logs/api/ | |
| * | |
| * Usage example (update with YOUR values): | |
| * export LOG_BETTERSTACK_SOURCE_TABLE_NAME=mySource_dev | |
| * export LOG_BETTERSTACK_SOURCE_ID=7654321 | |
| * export LOG_BETTERSTACK_API_HTTP_REMOTELY_ENDPOINT=https://eu-REPLACE_ME-connect.betterstackdata.com |
| // from : https://github.com/boly38/botEnSky/issues/15 | |
| const logtail_api_token = process.env.LOGTAIL_API_TOKEN; | |
| // Source NAME - get it from source config UI : "Basic" > "Source ID" - it's a name not an int | |
| const logtail_source_name = process.env.LOGTAIL_SOURCE_NAME; | |
| // Source ID - get it from source url, or from results of get sources api - it's an int | |
| const logtail_source_id = process.env.LOGTAIL_SOURCE_ID; | |
| // Import Axios |
| function sleep(ms) { | |
| return new Promise(resolve => setTimeout(resolve, ms)); | |
| } | |
| function promiseMethod() { | |
| return Promise.resolve("ok"); | |
| } | |
| // WARN WARN - this sample introduce some issue as #2757 is talking about : Event blockUpdate:(x, y, z) did not fire within timeout of 5000ms | |
| // use FIXED version below instead of this | |
| export const isAirBlock = b => b && b.name === 'air'; | |
| /** | |
| * Find a clear position dégagée next to the bot to place a bloc. | |
| * @param {Bot} bot - Mineflyer Bot Instance | |
| * @param {number} range - Around bot max range to explore. | |
| * @returns {pos} - A valid position or null if no one is found. | |
| */ | |
| export const findClearPosition = (bot, range = 3) => { |
| package com.mycompany; | |
| import static java.util.concurrent.Executors.newFixedThreadPool; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.concurrent.Callable; | |
| import java.util.concurrent.ExecutionException; | |
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.Future; |
| package com.example.company.interceptors; | |
| import java.io.IOException; | |
| import java.net.URI; | |
| import lombok.NonNull; | |
| import lombok.extern.slf4j.Slf4j; | |
| import org.springframework.http.HttpRequest; | |
| import org.springframework.http.client.ClientHttpRequestExecution; | |
| import org.springframework.http.client.ClientHttpRequestInterceptor; | |
| import org.springframework.http.client.ClientHttpResponse; |
keepassEnv.sh is linux-compatible (also git bash for windows works)keepassEnv.bat is windows-compatible (could be improved)keepassCheckout.sh is linux-compatible and allow to read multiple files in one shooteach script may be self-documented
| // https://github.com/umami-software/website/issues/191 | |
| // https://umami.is/docs/api/node-client | |
| import umami from "@umami/node"; // https://www.npmjs.com/package/@umami/node | |
| const hostUrl = "https://cloud.umami.is"; | |
| const websiteId = process.env.UMAMI_WEBSITE_ID || false; // umami instance id | |
| const websiteDomain = process.env.UMAMI_WEBSITE_DOMAIN || "myapp.example.com"; | |
| if (!websiteId) { | |
| throw new Error('Please set UMAMI_WEBSITE_ID env'); | |
| } |
| # list them all : [F8] then [2] | |
| # alphanum order ASC | |
| _hi | |
| _gg | |
| _gn3 | |
| _nice3 | |
| aaa | |
| aaaa | |
| air | |
| ban? |
| /// gist : https://gist.github.com/boly38/5752000289342895a6008e53df2c6c9f | |
| // from: https://github.com/boly38/botEnSky/issues/57 | |
| // ---------------------------- | |
| // ReST API to detect bird - from blog : https://blog.roboflow.com/bird-detection-api/ | |
| // API_KEY - REQUIRED - export ROBOFLOW_API_KEY=xxxx | |
| // https://app.roboflow.com / use public plan free and get your api key under profile | |
| const api_key = process.env["ROBOFLOW_API_KEY"] || "unauthorized"; | |
| // bird v2 public dataset based on JS sample provided |