Skip to content

Instantly share code, notes, and snippets.

View foolgry's full-sized avatar
😜
I may be slow to respond.

Foolgry foolgry

😜
I may be slow to respond.
View GitHub Profile
@goxofy
goxofy / 0x1_hammerspoon_plugins
Last active January 4, 2026 00:57
some hammerspoon plugins to make your macOS smarter
some hammerspoon plugins to make your macOS smarter
@etrobot
etrobot / langgraph_control_browser.py
Created April 18, 2024 14:00
langgraph generates python script to control the existing chrome
from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.pydantic_v1 import BaseModel, Field
import json,urllib.request,websockets,asyncio
from typing import TypedDict, List
import textwrap,html
from bs4 import BeautifulSoup, Tag, NavigableString,Comment
import os
from dotenv import load_dotenv,find_dotenv
load_dotenv(find_dotenv())
@ninehills
ninehills / chatpdf-zh.ipynb
Last active December 11, 2025 09:56
ChatPDF-zh.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
alias jps ='jps -lvm'
alias jpsk9='jps | fzf --reverse -m -e -i | cut -d " " -f1 | xargs kill -9 2>/dev/null'
alias jpsk ='jps | fzf --reverse -m -e -i | cut -d " " -f1 | xargs kill 2>/dev/null'
@lilydjwg
lilydjwg / gh-check
Last active March 20, 2025 01:02
gh-check: speed test to known GitHub IPs
#!/usr/bin/python3
import asyncio
import time
import socket
import argparse
import aiohttp
class MyConnector(aiohttp.TCPConnector):
local function Chinese()
-- 简体拼音
hs.keycodes.currentSourceID("com.apple.inputmethod.SCIM.ITABC")
end
local function English()
-- ABC
hs.keycodes.currentSourceID("com.apple.keylayout.ABC")
end
@wilon
wilon / vim-surround使用指南.MD
Last active March 11, 2025 04:30
vim-surround使用指南,vim-surround如何使用

普通模式

命令 说明 + 示例
ds 删除括号
ds " "Hello world!" =>
Hello world!
cs 替换括号
cs "( "Hello world!" =>
(Hello world!)
cS 替换括号,括号内文本做新一行
cS "{ "Hello world!" => {     Hello world! }
@skunkbad
skunkbad / Tunnel.php
Created February 18, 2017 09:06
Attempt to use an SSH tunnel to connect to MySQL on a remote host
<?php
/***
Based off code from:
https://www.experts-exchange.com/questions/26619790/Connect-to-Mysql-through-PHP-ssh2-tunnel.html
Example usage: User/Pass Based Auth MySQL Proxy
-----------------------------------------------
$user_pass_config = array(
'user' => 'username',
'pass' => 'password',
@subfuzion
subfuzion / curl.md
Last active December 24, 2025 13:07
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@squarism
squarism / iterm2.md
Last active January 5, 2026 20:33
An iTerm2 Cheatsheet

In the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So + D does not mean hold shift. + Shift + D does of course.

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key