Skip to content

Instantly share code, notes, and snippets.

@Geek4IT
Geek4IT / agent loop
Created March 10, 2025 03:56 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet

Nginx Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400,000 to 500,000 requests per second (clustered), most what i saw is 50,000 to 80,000 (non-clustered) requests per second and 30% CPU load, course, this was 2xIntel Xeon with HT enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

First, you will need to install nginx, my way to install nginx is compiling it from source, but for now we will use apt-get

@Geek4IT
Geek4IT / install_ffmpeg_ubuntu.sh
Created March 31, 2016 04:01 — forked from xdamman/install_ffmpeg_ubuntu.sh
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@Geek4IT
Geek4IT / supervisord-example.conf
Created November 5, 2015 12:27
Example configuration file for supervisord.conf
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon
@Geek4IT
Geek4IT / supervisord-example.conf
Last active August 29, 2015 14:26 — forked from didip/supervisord-example.conf
Example configuration file for supervisord.conf
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon
@Geek4IT
Geek4IT / gist:6109822
Last active December 20, 2015 09:40
Copying, opening and accessing your database in your Android application. Step1:Put cities.db in your directory ->assets Step2: CityDBHelper myDbHelper = new CityDBHelper (); myDbHelper = new CityDBHelper (this); try { myDbHelper.createDataBase(); } catch (IOException ioe) { throw new Error("Unable to create database"); } try { myDbHelper.openD…
public class CityDBHelper extends SQLiteOpenHelper {
private static int DB_VERSION = 1;
private static String DB_PATH = Environment.getDataDirectory()
.getPath()+"/data/com.geek4it.demo/databases/";
private static String DB_NAME = "cities";
private SQLiteDatabase myDataBase;
private final Context myContext;
public CityDBHelper(Context context) {
@Geek4IT
Geek4IT / gist:6027042
Last active December 19, 2015 22:19
How to get the package name & class name of phone app & sms app?
public void getPhoneApkName() {
Uri uriIntent = Uri.parse("tel:xxx-xxx-xxxx");
Intent intent = new Intent("android.intent.action.DIAL", uriIntent);
List<ResolveInfo> apps = getPackageManager().queryIntentActivities(
intent, 0);
final int count = apps.size();
ComponentInfo ci = null;
for (int i = 0; i < count; i++) {
ResolveInfo info = apps.get(i);