Skip to content

Instantly share code, notes, and snippets.

@jlia0
jlia0 / agent loop
Last active December 5, 2025 18:47
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
@snakecase
snakecase / Beep on replay buffer save.lua
Last active November 30, 2025 08:55 — forked from upgradeQ/beep.lua
OBS Lua: Sound notification on replay buffer save [Windows]
local obs = obslua
local ffi = require("ffi")
local winmm = ffi.load("Winmm")
-- Put a sound of your choosing next to "Beep on replay save.lua" and don't forget to match its name either in code below or rename your file.
PROP_AUDIO_FILEPATH = script_path() .. "sound_npc_scanner_scanner_photo1.wav"
ffi.cdef[[
bool PlaySound(const char *pszSound, void *hmod, uint32_t fdwSound);
]]
@grizmio
grizmio / gist:90996af3ee7e31937e2a291218a7c094
Created September 9, 2021 14:39
Installing dropwatch on ubuntu 20.04
For the next error, install libtool
cc -g -Wall -Werror -I/usr/include/libnl3 -I/usr/include/libnl3 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/usr/include/readline -g -O2 -lnl-3 -lnl-genl-3 -lnl-3 -lreadline -lpcap -lbfd -o dropwatch main.o lookup.o lookup_kas.o lookup_bfd.o
/usr/bin/ld: main.o: in function `free_netlink_msg':
/home/aneweraofwonder/srcs/dropwatch/src/main.c:254: undefined reference to `nlmsg_free'
/usr/bin/ld: main.o: in function `handle_dm_config_new_msg':
/home/aneweraofwonder/srcs/dropwatch/src/main.c:561: undefined reference to `genlmsg_parse'
/usr/bin/ld: /home/aneweraofwonder/srcs/dropwatch/src/main.c:570: undefined reference to `nla_get_u8'
@plembo
plembo / upnper4dont.md
Last active July 11, 2025 13:52
UPnP with EdgeRouter: Don't do it! Ubiquiti. ER-4.

Want to configure UPnP on EdgeRouter-4?

Don't do it!

Introduction

As a former sysadmin that once helped ride herd over around 1,000 servers, of which around 10% were Internet-facing, I've never been a fan of autoconfiguation when it comes to punching holes through the firewall. I've seen the tripwire logs, and it's sobering.

The Problem

So enabling UPnP on my EdgeRouter-4 wasn't something I had on the roadmap, but when I ran into difficulty getting DLNA to work on the default VLAN, I thought it was worth looking into (never mind that, as I later learned, having UPnP turned on wasn't going make a bit of difference on my local network: another reason that mastering theory should always come before practice).

@NekoApocalypse
NekoApocalypse / SICP_stream_readme.md
Last active October 25, 2020 05:34
SICP 直播公告

直播公告:令人头秃的现代魔法 -- SICP

膨胀啦!!!

从今天开始直播阅读传说中的计算机魔法书 SICP (Structure and Interpretation of Computer Programs)。

读书本来是一件很自闭的事情,阅读与分享,通常也是分开去做的事情。但是在面对一本高深又艰难的书的时候,不免会有很重的畏难情绪... 如果没有什么很有效的激励措施的话,很可能有生之年就这么拖延下去了。必须想点办法才行。

因为有这样的想法,所以就有了这样一个直播。

@umardx
umardx / Openvswitch LTS in CentOS 7.md
Last active December 6, 2022 13:50
Installation Openvswitch LTS in CentOS 7

Based on this post: https://n40lab.wordpress.com/2016/03/02/openvswitch-lts-in-centos-7 The most recent release from the LTS series: http://openvswitch.org/releases/openvswitch-2.5.4.tar.gz

Instructions:

As the root user let’s install some packages:

yum -y install wget openssl-devel gcc make python-devel openssl-devel kernel-devel graphviz kernel-debug-devel autoconf automake rpm-build redhat-rpm-config libtool python-twisted-core python-zope-interface PyQt4 desktop-file-utils libcap-ng-devel groff checkpolicy selinux-policy-devel
@AndersonIncorp
AndersonIncorp / install.sh
Last active November 30, 2021 05:56
OS X to Linux gcc cross compiler build (arch linux x86_64 as target)
#!/bin/bash
set -e
# Prerequirements
# brew install gcc (gmp libmpc mpfr isl)
# copy /usr/lib && /usr/include from arch linux into your CC_ROOT.
# /usr/local/linux/usr/include
# /usr/local/linux/usr/lib
# /usr/local/linux/usr/local/include
# arch linux is target enviroment for this cross compiler
# x86_64 binutils && gcc
@dmke
dmke / README.md
Created November 17, 2016 14:58
mt7261 32M reset patch

"Frozen soft reset" on MT7261 SoCs with 32M flash

This hack is derived from [this mail][] by Paul Fertser on openwrt-devel.

  • When using 32M flash, the SPI bus needs to be reconfigured to use 4-byte addressing mode, instead of the usual (?) 3-byte mode.
  • Issueing a soft reset without this patch leaves the bus in 4-byte mode, which then crashes the system because the SoC tries (and fails) to communicate in 3-byte addressing mode.
  • Writing the opcodes brings the SPI back into 3-byte addressing mode,
@p1nesap
p1nesap / YouTubeAPI.gs
Last active November 20, 2024 18:04
Google YouTube API display real-time channel subscribers, view count
function createDoc() {
var doc = DocumentApp.getActiveDocument();
var body = doc.getBody();
//Put your unique API key in UNIQUE_KEY section below
var url = "https://www.googleapis.com/youtube/v3/channels?id=UNIQUE_KEY&part=statistics&fields=items(statistics(viewCount, subscriberCount))";
var response = UrlFetchApp.fetch(url);
var astext = response.getContentText();
//var nobrak = astext.replace(/[\])}[{(]/g, '');
//var strip = astext.replace(/[\(\)\[\]{},'"]/g,"").replace("items:", "").replace("statistics:", "").replace("viewCount", "Total Views").replace("subscriberCount", "Subscribers");
@itrobotics
itrobotics / btn_reboot.c
Created May 13, 2015 09:56
a simple linux driver code to use the GPIO-BUTTON to reboot via call_usermodehelper()
/*
* DESCTIPTION:
* pressing the button for about 5 seconds continually, and then reboot
* use the timer to perform this fucntion
* */
#include <linux/module.h>
#include <linux/string.h>
#include <linux/fs.h>
#include <asm/uaccess.h>