Skip to content

Instantly share code, notes, and snippets.

View danialothman's full-sized avatar

Danial Othman danialothman

View GitHub Profile
@MahdadGhasemian
MahdadGhasemian / minio_backup_restore_guide.md
Last active May 24, 2025 21:21
Steps to backup and restore Minio Buckets

Restore Backup with Minio (Minio <----> Local)

Instructions for restoring buckets using Minio mirror features.

Install Minio Client

Install Link install link

@gngchrs
gngchrs / compose.yaml
Last active April 8, 2025 07:31
Ollama Web UI and Tailscale with https. The config file below goes in your config/config.json. Once you have these files do `docker compose up` and go to `https://ollama-ui.<tailnet>.ts.net. First request will take a little longer to load`
services:
ts-ollama-ui:
image: tailscale/tailscale:latest
container_name: ts-ollama-ui
hostname: ollama-ui # http://ollama-ui.<tailnet>.ts.net
extra_hosts:
- "host.docker.internal:host-gateway" # important for ollama web ui to communicate with ollama running locally
environment:
- TS_AUTHKEY=<YOUR_OAUTH_KEY / YOUR_AUTH_KEY >
- "TS_EXTRA_ARGS=--advertise-tags=tag:container --reset" ## only needed if you use YOUR_OAUTH_KEY with owner tags
@zapisnicar
zapisnicar / telegram_bot.md
Last active May 29, 2025 20:10
How to create Telegram bot and send messages to group

How to create Telegram Bot and send messages to your group

  1. Create Telegram bot:

    Search for user @BotFather in Telegram app. Type /help in BotFather chat and wait for the reply. Type in the chat:

    /newbot

or select /newbot command from Help text. Answer few setup questions:

@Adem68
Adem68 / flutter-project-line.md
Last active April 15, 2025 15:55
How many lines does your Flutter project have?
  • Open terminal and go to your project's lib folder. After that run the command below.
  • find . -name '*.dart' ! -name '*.g.dart' ! -name '*.freezed.dart' ! -name '*.gr.dart' ! -name '*.gen.dart' | xargs wc -l

Thanks @AcetylsalicylicAcid for excluding generated files.

@jeffehobbs
jeffehobbs / vibration_sensor_ESP32_HA_how_to.txt
Last active May 22, 2025 00:50
Vibration Sensor for ESPHome/Home Assistant
GOAL: Send a push notification after the (vibrations from the) dryer cycle has completely stopped.
USING:
* Inexpensive hardware (see below)
* ESPhome (http://esphome.io) for chip firmware
* Home Assistant (http://hass.io) for sensor state machine and push notification.
---
SHOPPING LIST:
@faisalraja
faisalraja / preferences.dart
Created January 17, 2019 03:03
SharedPreference helper for flutter
class Preference {
static SharedPreferences _prefs;
static Map<String, dynamic> _memoryPrefs = Map<String, dynamic>();
static Future<SharedPreferences> load() async {
if (_prefs == null) {
_prefs = await SharedPreferences.getInstance();
}
return _prefs;
}
@geek-at
geek-at / smartmeter.ino
Created October 19, 2018 08:34
Example script to log flashing light to influxdb via UDP. See https://blog.haschek.at/smartmeter for more info
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
WiFiUDP Udp;
const char* ssid = "yourwifiSSID";
const char* password = "yourwifipassword";
const int threshold = 400; //this is the threshold how high the value has to be to be registered as a flash.
//400 works great for me since flashes are usually ~600
IPAddress remoteIP(192,168,1,117); // the IP address of your Influxdb server
@shiyazt
shiyazt / Client_Side_RPC.py
Last active May 9, 2024 09:15
This Section illustrates the Client Side and Server side RPC (Remote Procedure Call) in ThingsBoard IoT Platform. Client_Side_RPC.py : This program will illustrates the Client side, RPC Server_Side_RPC.py : This Program will illustrates the Server side RPC and Temperature_Controller_Server_Side_RPC.py : This program illustrates Server side RPC u…
# This Program illustrates the Client Side RPC on ThingsBoard IoT Platform
# Paste your ThingsBoard IoT Platform IP and Device access token
# Client_Side_RPC.py : This program will illustrates the Client side
import os
import time
import sys
import json
import random
import paho.mqtt.client as mqtt