Skip to content

Instantly share code, notes, and snippets.

View linw1995's full-sized avatar
🎯
Focusing

林玮 (Jade Lin) linw1995

🎯
Focusing
View GitHub Profile
@mdvorak
mdvorak / BTT_Pi_DS18B20.md
Last active May 27, 2024 09:48
DS18B20 on BigTreeTech Pi
@mrballcb
mrballcb / rancher_desktop_BIP.txt
Last active April 6, 2023 08:46
Configure Rancher Desktop 1.0.0 to use a custom bridge IP on Mac
# This will survive restarts of Rancher Desktop. I don't expect it to survive "Reset Kubernetes" actions.
# This will get a shell inside the running VM.
# Many thanks to Jan Dubois, this one liner replaced a complicated set of commands I had here earlier.
LIMA_HOME="$HOME/Library/Application Support/rancher-desktop/lima" limactl shell 0
sudo su -
vi /etc/conf.d/docker
# Add to the DOCKER_OPTS cli the bip and subnet you want. I picked a very small /24 at the end of the 172.16/20 space:
from bcc import BPF
import ctypes
bpf_text ="""
#include <linux/ptrace.h>
#include <linux/sched.h> /* For TASK_COMM_LEN */
#include <linux/icmp.h>
#include <linux/ip.h>
#include <linux/netdevice.h>
#ifndef lazy_memory_h
#define lazy_memory_h
#include <stdint.h>
#include <string.h>
#define CacheLine 64
#define WordSize (sizeof(uint64_t) * 8) // 64 (bits)
#define AlignN(s, n) (( s + n - 1) / n * n)
@frostming
frostming / promise.py
Last active June 16, 2024 18:17
Python implementation of JavaScript's Promise interface
"""
Python implementation of JavaScript's Promise interface
with the power of asyncio.
See https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise
for the API specification.
Authored by: Frost Ming <mianghong@gmail.com>
License: WTFPL
"""
@kemingy
kemingy / client.py
Last active June 17, 2024 08:49
unix domain socket vs. multiprocessing transfer time
import socket
import numpy as np
import pickle
import time
import struct
matrix = np.random.random((224, 224, 3))
socket_path = './uds.sock'
@ackerleytng
ackerleytng / .zprofile
Last active January 3, 2023 13:50
zsh config
if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
exec startx
fi
@h1code2
h1code2 / readme.md
Last active January 23, 2024 06:32
FRIDA抓包相关笔记/常用操作 #frida #抓包 #hook #okhttp #proxy #pinning # ssl

FRIDA抓包相关笔记/常用操作

原文链接:https://api-caller.com/2019/11/05/capture-note/

抓包应该是被问到最多的事情了, 记录一些片段.

珍惜Any 之前提过 一种思路 是遍历所有类, 按照特征去判断校验类和方法.

此处的思路则是, 先跑一遍并让它失败, 找到特征打印堆栈, 即可锁定位置, 再行 hook 即可.

@yarreg
yarreg / fetch_driver
Created January 26, 2020 19:36
Installation MERCUSYS MW150US USB 2.0
#!/bin/bash
#set -e
# install-wifi - 22/01/2020 - by MrEngman.
UPDATE_SELF=${UPDATE_SELF:-1}
UPDATE_URI="http://downloads.fars-robotics.net/wifi-drivers/install-wifi"
ROOT_PATH=${ROOT_PATH:-"/"}
WORK_PATH=${WORK_PATH:-"${ROOT_PATH}/root"}
@BenjaminPoncet
BenjaminPoncet / ffmpeg-wrapper
Last active June 21, 2024 11:40
Synology VideoStation ffmpeg wrapper with DTS, EAC3 and TrueHD support. This project is no longer maintained: Please see the following projects: https://github.com/darknebular/Wrapper_VideoStation/ - https://github.com/AlexPresso/VideoStation-FFMPEG-Patcher
#!/bin/bash
rev="12"
_log(){
echo "$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - $1" >> /tmp/ffmpeg.log
}
_log_para(){
echo "$1" | fold -w 120 | sed "s/^.*$/$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - = &/" >> /tmp/ffmpeg.log