Skip to content

Instantly share code, notes, and snippets.

View jifanchn's full-sized avatar

jifan jifanchn

  • Fudan Unviersity
  • Shanghai China
  • 00:26 (UTC +08:00)
View GitHub Profile
@steipete
steipete / windsurf-auto-continue.js
Last active July 14, 2025 08:22
Windsurf Auto Continue press button JS. Windsurf Menu Help -> Toggle Developer Tools -> Paste into Console.
// Windsurf Auto Press Continue v13.2 (with added logging)
(() => {
const SCRIPT_NAME = 'Windsurf Auto Press Continue v13.2 (logged)'; // Updated name for clarity
let intervalId = null, lastClick = 0;
// --- Config ---
const BTN_SELECTORS = 'span[class*="bg-ide-button-secondary-background"]';
const BTN_TEXT_STARTS_WITH = 'continue';
const SIDEBAR_SELECTOR = null;
const COOLDOWN_MS = 3000;
@farrrb
farrrb / toolchain_c2000.cmake
Last active November 4, 2024 08:44
C2000 Compiler Toolchain File for CMake (TMS320x2xxx Microcontroller)
###############################################################################
# cl2000 - Toolchain File
# F. Zahn - 2018
###############################################################################
#set this path according to your needs
set(CGT_TOOLCHAIN_DIR "C:/your/path/to/the/toolchain")
# set target system
set(CMAKE_SYSTEM_NAME Generic)
@hongyangqin
hongyangqin / 1.html.md
Created January 5, 2018 15:55
visual studio 2015 key vs2015密钥
@Cretezy
Cretezy / systemd-user-fix.md
Created May 21, 2017 18:38
systemd user "Failed to connect to bus: No such file or directory"

Simply add this snippet...

export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"

...to .bashrc or .zshrc or any file ran on login.

@0xjairo
0xjairo / toolchain-ti-c2000.cmake
Last active June 23, 2021 05:03
TI C2000 (F2807x) CMake toolchain file
# Create a file named options.cmake and populate with valid paths assigned to the following:
#
# set(CG_TOOL_ROOT "/opt/ti/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS")
# set(DEVICE_SUPPORT_ROOT "/home/asdf/controlSUITE/device_support/F2807x/v210")
#
# Then do:
# mkdir build && cd build
# cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-ti-c2000.cmake ..
# make
@laobubu
laobubu / ABOUT.md
Last active July 7, 2025 23:42
A very simple HTTP server in C, for Unix, using fork()

Pico HTTP Server in C

This is a very simple HTTP server for Unix, using fork(). It's very easy to use

How to use

  1. include header httpd.h
  2. write your route method, handling requests.
  3. call serve_forever("12913") to start serving on port 12913
@fchollet
fchollet / classifier_from_little_data_script_3.py
Last active February 26, 2025 01:37
Fine-tuning a Keras model. Updated to the Keras 2.0 API.
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats