Skip to content

Instantly share code, notes, and snippets.

@cnjax
cnjax / gist:f6373cf70fc1ee706392c3af365f1ac2
Created April 7, 2025 09:22 — forked from ares-koen/gist:a6922855d31e484b8ab72e4ff5bfc228
UniDoc/UniPDF and UniDoc/UniOffice license fix for development testing. To use in Production, get a license from unidoc.io.
===========================================================================================================================================
[Example Version: unidoc/[email protected]]
===========================================================================================================================================
1. In [GOPATH]/pkg/mod/github.com/unidoc/[email protected]/common/license/license.go, replace Public Key with the following key.
___________________________________________________________________________________________________________________________________________
New Public Key: "\u000a\u002d\u002d\u002d\u002d\u002d\u0042\u0045\u0047\u0049\u004e\u0020\u0050\u0055\u0042\u004c\u0049\u0043\u0020\u004b\u0045\u0059\u002d\u002d\u002d\u002d\u002d\u000a\u004d\u0049\u0049\u0042\u0049\u006a\u0041\u004e\u0042\u0067\u006b\u0071\u0068\u006b\u0069\u0047\u0039\u0077\u0030\u0042\u0041\u0051\u0045\u0046\u0041\u0041\u004f\u0043\u0041\u0051\u0038\u0041\u004d\u0049\u0049\u0042\u0043\u0067\u004b\u0043\u0041\u
@cnjax
cnjax / agent loop
Created March 10, 2025 07:22 — 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
@cnjax
cnjax / pocketbase.go
Last active August 16, 2023 11:02 — forked from r--w/pocketbase.go
fix for auth admin with password
package pocketbase
import (
"errors"
"fmt"
"github.com/duke-git/lancet/v2/convertor"
"github.com/go-resty/resty/v2"
"golang.org/x/sync/singleflight"
"time"
)
@cnjax
cnjax / cloudflare-cdn-routing-anomaly-detailed-test.md
Created March 19, 2021 14:02 — forked from isaumya/cloudflare-cdn-routing-anomaly-detailed-test.md
Cloudflare CDN Routing Anomaly detailed test across multiple DNS resolvers

Cloudflare CDN Routing Anomaly Detailed Test Across Multiple DNS Resolvers

Here are some key details about my testing location and ISP:

Important Note: Keep an eye on the value of colo on the following response. As that value will show exactly from which Cloudflare CDN edge the data is getting served from. Moreover these 3 letter colo values are basically the IATA airport code on that city. So, you can use a website like World Airport Codes to find out the exact City and Country Name.

@cnjax
cnjax / database.py
Created September 14, 2020 14:34 — forked from plockaby/database.py
Python Flask Connection Pool
import logging
import psycopg2
from psycopg2.extras import RealDictCursor
from psycopg2.extensions import TRANSACTION_STATUS_UNKNOWN, TRANSACTION_STATUS_IDLE
from flask import g
import threading
import tenacity
import uuid
import pwd
import os
@cnjax
cnjax / Activate Office 2019 for macOS VoL.md
Created August 23, 2019 15:53 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@cnjax
cnjax / nginx-cors.conf
Created July 24, 2019 01:53 — forked from sbuzonas/nginx-cors.conf
Nginx CORS maps
map $http_origin $allow_origin {
default "";
"~^https?://(?:[^/]*\.)?(stevebuzonas\.(?:com|local))(?::[0-9]+)?$" "$http_origin";
}
map $request_method $cors_method {
default "allowed";
"OPTIONS" "preflight";
}