Posts

Run your apps in the system background

Image
The cron utility is a job-scheduling tool found on all Linux and Unix operating systems, as well as macOS. Although cron is typically used to schedule jobs at fixed times, dates, and intervals, it can also launch jobs at system boot time. This guide explains how to use the cron utility and the crontab file to run a job or script when the system boots. Here we can use this facility to run a specific file or an entire projects like Telegram bots, applications or any dtabase operations at the time of boot up and the applications will be continue to run in backgroud, and there wont be any interfaces for the same on the desktop. Here I'm demostrating a script that run a Telegram Bot. I'm using an Ubuntu PC for the same. You can use your VPS / any linux distros, or even small PCs like raspberry Pi too for this purpose. 1. First, I need to create a shell script and save it in any directory. Here I'm using the file name run.sh Here in t...

Clonebot Technical Documentation

Image
Clone Bot Home Reference Updates Repo Link License Credits Releases Version 1.1 Version 1.2 Version 1.3 Version 1.4 Version 1.5 Disclaimer ◼️ MANDATORY VARIABLES TG_BOT_TOKEN - Get from @BotFather APP_ID - Get from my.telegram.org API_HASH - Get from my.telegram.org TG_USER_SESSION - Run any userbot session maker DB_URI = os.environ.get("DATABASE_URL", "") AUTH_USERS = [] User string sessions can be generated using any pyrogram V2 compatible session maker, or can be use this repo ◼️ BUTTONS USED IN THIS BOT Terminate - To stop the bot from unauthorised usage Home - Main menu FNAC - File name as caption ...

Create a watch dog script for Local Git Repository to Pull commits !

 How to create a watch dog scrip for a git folder in your local computer? Need: We clone a public repository to our local computer and executing the code from there. When doing  commit to the pull request done in the upstream master, in each and every time we need to pull the same manually to our local repository.  To solve the issue, we can create a script and configure the same to the start up options will update the local repository with respect to  the parent repository changes. Clone a repository to a local folder using the following commands In Linux Terminal, run the following code: git clone https://<link_to_the_GitHub_repository> Now what i doing is,  am renaming the cloned repository to 'git_folder' Change the directory to the 'git_folder' using cd command  Run in Linux terminal: nano script_run.sh                        #Save this code as script_run.sh (Can customise the ...

Self-Regulating Battery Charger Circuit

Image
The post explains how a neat little self-regulating automatic battery charger circuit can be made using just two inexpensive transistors. How it Works As can be seen in the diagram, this auto-regulating battery charger circuit utilizes just two transistors for detecting the charging thresholds, and cuts off the process as soon as these limits are detected. Using two transistor actually makes the design hugely sensitive compared to a single transistor charger circuit. The indicated preset is set in such a way that the T1 is just able to conduct at the specified full charge threshold of the battery. When this happens T2 begins switching OFF, and ultimately at a point it is unable to sustain the relay conduction and switches OFF the relay, which in turn cuts of the input charging source with the connected battery. Conversely, when the battery voltage begins dropping, T1 gradually deprived of its adequate conduction voltage level, and ultimately it ceases to conduct, which quickly prompts ...