Skip to content

Instantly share code, notes, and snippets.

View winguse's full-sized avatar
🎣
fishing

Yingyu Cheng winguse

🎣
fishing
View GitHub Profile
@zhuowei
zhuowei / Ensemble.plist
Last active September 18, 2023 06:26
Put this file as /Library/Preferences/FeatureFlags/Domain/Ensemble.plist and reboot to (hopefully) turn on Universal Control on macOS 12
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- not sure which one it is, so set both -->
<key>Ensemble</key>
<dict>
<key>Enabled</key>
<true/>
</dict>
@iffa
iffa / ax201-hostapd.conf
Created June 1, 2021 10:29
hostapd config for Intel WiFi6 AX201 (5Ghz)
# Config for Intel WiFi6 AX201
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=1
ssid=AwesomeWifi
@FreddieOliveira
FreddieOliveira / docker.md
Last active April 24, 2024 15:05
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@yihong0618
yihong0618 / shanbay_remember.js
Last active December 1, 2022 04:40
扇贝加密破解自动发送今日新词到 telegram
const https = require("https");
const token = ""; // change this to you telegram bot token!
const chatId = ""; // change this to your telegram chat id!
const cookie = ""; // change this to your shanbay cookie!
const PATH_API = (page) =>
`/wordsapp/user_material_books/blozps/learning/words/today_learning_items?ipp=10&page=${page}&type_of=NEW`;
const options = {
@wzyboy
wzyboy / fetch-prices.py
Last active June 3, 2023 04:33
Fetch prices from IEX API for Beancount
#!/usr/bin/env python
'''A quick-and-dirty script to fetch prices from IEX API.'''
import sys
import argparse
import requests
from dateutil.parser import parse as parse_datetime
from beancount.core import data
@yueyuzhao
yueyuzhao / across.client.js
Created August 28, 2018 13:06
代理翻墙 (nodejs实现)
// 客户端实现
const net = require('net')
const tls = require('tls')
const localServer = new net.Server()
localServer.on('connection', (socket) => {
socket.pause()
const context = {
@ErikAugust
ErikAugust / spectre.c
Last active April 15, 2024 13:55
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@sryze
sryze / proxy
Last active September 3, 2023 10:20
Quickly toggle HTTP(S) proxy on Mac OS X from command line
#!/bin/sh
SERVICE="Ethernet" # or "Wi-Fi"
PROXY_HOST="127.0.0.1"
PROXY_PORT="8888"
while [[ $# > 0 ]]
do
case "$1" in
on)
@kizzx2
kizzx2 / hammerspoon-move-resize.lua
Last active December 19, 2022 06:47
Hammerspoon script to move/resize window under cursor
-- Inspired by Linux alt-drag or Better Touch Tools move/resize functionality
function get_window_under_mouse()
-- Invoke `hs.application` because `hs.window.orderedWindows()` doesn't do it
-- and breaks itself
local _ = hs.application
local my_pos = hs.geometry.new(hs.mouse.getAbsolutePosition())
local my_screen = hs.mouse.getCurrentScreen()
@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no