Skip to content

Instantly share code, notes, and snippets.

View pacoyang's full-sized avatar

Paco Yang pacoyang

View GitHub Profile
@jlia0
jlia0 / agent loop
Last active March 31, 2025 22:34
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
@seratch
seratch / README.md
Last active March 31, 2024 13:43
Sign in with Slack - the simplest example

You can run this app by following the steps below:

Set up your Slack app

  • Create a new Slack app from https://api.slack.com/apps?new_app=1
  • Go to OAuth & Permissions
    • Add identity.basic & identity.email to User Token Scopes
    • Add OAuth Redirect URL
  • Go to Basic Information
  • Grab the Client ID & Client Secret in the page
@Leechael
Leechael / example.ts
Last active February 16, 2021 13:01
one-time restore initial from async func.
import { atom } from "jotai";
import AsyncStorage from "@react-native-community/async-storage";
const jwtTokenAtom = atom<string, string>("", (_, set, value) => {
set(jwtTokenAtom, value);
AsyncStorage.setItem("jwt_token", value);
});
jwtTokenAtom.onMount = (set) => {
@tannerlinsley
tannerlinsley / createCrudHooks.js
Created November 29, 2020 06:39
A naive, but efficient starter to generate crud hooks for React Query
export default function createCrudHooks({
baseKey,
indexFn,
singleFn,
createFn,
updateFn,
deleteFn,
}) {
const useIndex = (config) => useQuery([baseKey], indexFn, config)
const useSingle = (id, config) =>
@aztack
aztack / init.gradle
Created April 2, 2020 09:52
init.gradle
// ~/.gradle/init.gradle
allprojects {
def google_uri = new URI('https://maven.aliyun.com/repository/google')
def central_uri = new URI('https://maven.aliyun.com/repository/central')
def jcenter_uri = new URI('https://maven.aliyun.com/repository/jcenter')
repositories {
all {
ArtifactRepository repo ->
if (repo instanceof MavenArtifactRepository) {
@ihciah
ihciah / README.MD
Last active June 4, 2023 01:23
V2ray MTProto through Shadowsocks

V2ray MTProto through Shadowsocks

Why use it

The MTProto is easy to block; shadowsocks is hard to identify but cannot work without a client.

You can deylop this docker image to run a relay inside the firewall (China/Russia etc.), it provide a MTProto and all the packets will be sent through shadowsocks protocol.

How to run

@lesstif
lesstif / nginx-with-tls13-compile.sh
Last active July 12, 2024 00:36
openssl 1.1 & nginx compile script for TLS 1.3 support on RHEL/CentOS 7
#!/bin/bash
## nginx
NGINX=nginx-1.19.4.tar.gz
if [ ! -f "${NGINX}" ];then
wget https://nginx.org/download/${NGINX}
fi
ND=$(basename $NGINX .tar.gz)
@Leechael
Leechael / set-alicdn-ssl-cert.py
Last active July 10, 2022 10:24
通过脚本设置阿里云 CDN 的证书
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
通过脚本设置阿里云 CDN 的证书
https://help.aliyun.com/document_detail/45014.html
$ pip install aliyun-python-sdk-cdn click
@mes01
mes01 / LC_CTYPE.txt
Created October 31, 2017 16:27 — forked from thanksdanny/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@TyrfingMjolnir
TyrfingMjolnir / dehydratedQuickstart
Created October 23, 2017 13:23
dehydrated Quickstart
cd /opt
git clone https://github.com/lukas2511/dehydrated
cd dehydrated
sudo mkdir -p /usr/local/etc/dehydrated
sudo mkdir -p /var/www/dehydrated
cp docs/examples/config /usr/local/etc/dehydrated
vim /usr/local/etc/dehydrated/config
echo "domain.tld mail.domain.tld www.domain.tld ws.domain.tld api.domain.tld" > /usr/local/etc/dehydrated/domains.txt
Make sure /var/www/dehydrated is exposed publicly as this is the temp folder used for validation; \