Skip to content

Instantly share code, notes, and snippets.

@openainext
openainext / agent loop
Created March 11, 2025 10:02 — 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
@openainext
openainext / esm-package.md
Created May 27, 2023 08:43 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
#!/bin/bash -x
#### Media file extraction script.
# This script processes files in a directory and extracts them and places them somewhere else for filebot.
#
command -v unrar >/dev/null 2>&1 || { echo >&2 "I require unrar but it's not installed or in my $PATH. Aborting."; exit 1; }
# Set up some logging
@openainext
openainext / Cloudant View for Intrusion Detection System
Created September 29, 2020 15:06 — forked from francabrera/Cloudant View for Intrusion Detection System
A simple cloudant view which analyze the logged calls to the QE API in order to find suspected logs. Based on:
function (doc) {
if (doc.loopback__model__name == "Auditlog"){
var filters = {
"filters":{
"filter":[
{
"id":"1",
"rule":"(?:\"[^\"]*[^-]?>)|(?:[^\\w\\s]\\s*\\\/>)|(?:>\")",
"description":"Finds html breaking injections including whitespace attacks",
"tags":{
@openainext
openainext / npm.taobao.sh
Created January 22, 2019 14:52 — forked from 52cik/npm.taobao.sh
npm 淘宝镜像配置
npm set registry https://registry.npm.taobao.org # 注册模块镜像
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像
## 以下选择添加
npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass # node-sass 二进制包镜像
npm set electron_mirror https://npm.taobao.org/mirrors/electron/ # electron 二进制包镜像
npm set puppeteer_download_host https://npm.taobao.org/mirrors # puppeteer 二进制包镜像
npm set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver # chromedriver 二进制包镜像
npm set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver # operadriver 二进制包镜像
npm set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs # phantomjs 二进制包镜像
@openainext
openainext / gethSyncingProgress.js
Created February 3, 2018 05:24 — forked from lyricalpolymath/gethSyncingProgress.js
ETHERUM BLOCKCHAIN SYNCING PROGRESS (Geth) - simple - give a quick feedback on the progress of the blockchain launched though the geth command line and not the ethereum wallet
//with geth running -copy and paste this code to have a simple feedback of the blockchain syncing progress
geth --exec 'var s = eth.syncing; console.log("\n------------ GETH SYNCING PROGRESS\nprogress: " + (s.currentBlock/s.highestBlock*100)+ " %\nblocks left to parse: "+ (s.highestBlock-s.currentBlock) + "\ncurrent Block: " + s.currentBlock + " of " + s.highestBlock)' attach
@openainext
openainext / set-proxy-for-atom.md
Created September 12, 2017 14:46 — forked from binderclip/set-proxy-for-atom.md
set shadowsocks proxy for atom

~/.atom/.apmrc

strict-ssl = false
http-proxy = http://127.0.0.1:8090/proxy.pac
$ apm config list
...
@openainext
openainext / topkeywords.js
Created September 3, 2016 19:04 — forked from elliotbonneville/topkeywords.js
Find top keywords associated with a Google search with this Node.js application.
var request = require("request"),
cheerio = require("cheerio"),
url = "https://www.google.com/search?q=data+mining",
corpus = {},
totalResults = 0,
resultsDownloaded = 0;
function callback () {
resultsDownloaded++;
@openainext
openainext / node-redis-visitor-counter.js
Created August 25, 2016 01:46 — forked from hubgit/node-redis-visitor-counter.js
A basic visitor counter for Node.js, storing counters in Redis
// embed an img element in an HTML page, point it at this.
var sys = require("sys"), http = require("http"), crypto = require("crypto");
var db = require("redis-client").createClient();
http.createServer(function(request, response) {
var date = new Date;
var day = date.getUTCFullYear() + "-" + (date.getUTCMonth() + 1) + "-" + date.getUTCDate();
@openainext
openainext / Gulp + nodemon + ejs + less + browserSync livereload
Created July 6, 2016 04:02
Gulp + nodemon + ejs + less + browserSync livereload
var gulp = require('gulp'),
less = require('gulp-less'),
path = require('path'),
minifyCSS = require('gulp-minify-css'),
browserSync = require('browser-sync').create(),
nodemon = require('gulp-nodemon');
gulp.task('less', function () {
return gulp.src('./public/stylesheets/less/main.less')
.pipe(less())