Skip to content

Instantly share code, notes, and snippets.

View iqiancheng's full-sized avatar
🌴
On vacation

千橙 iqiancheng

🌴
On vacation
View GitHub Profile
@iqiancheng
iqiancheng / install_macos_apps.sh
Created January 3, 2025 08:42
Homebrew批量安装脚本
#!/bin/bash
# Update Homebrew
echo "Updating Homebrew..."
brew update
# Add necessary taps
echo "Adding required taps..."
brew tap homebrew/cask-versions
brew tap homebrew/cask-fonts
@iqiancheng
iqiancheng / setup_conda.sh
Created January 3, 2025 07:44
一个 shell 脚本来一次性配置这些 conda 设置
#!/bin/bash
# Script to configure conda settings
echo "Starting conda configuration..."
# Set proxy servers
conda config --set proxy_servers.http http://127.0.0.1:7890
conda config --set proxy_servers.https http://127.0.0.1:7890
# Set default channel
@iqiancheng
iqiancheng / README.md
Last active January 1, 2025 14:52
解决 Telegram 无法联网的问题

一般开了代理也无法解决,一直转圈无法联网,最后发现是没有正确设置Proxy

路径:Settings --> Data and Storage --> Connection Type (Use Proxy) 填入Proxy信息

127.0.0.1
7890

Relate Works

@iqiancheng
iqiancheng / README.md
Last active January 1, 2025 13:50
Orbstack setup

OrbStack 配置 registry 源文件的文件路径: ~/.orbstack/config/docker.json 写入

{
    "registry-mirrors":[   
        "https://mirror.ccs.tencentyun.com",
        "https://docker.m.daocloud.io",
        "https://dockerproxy.com",
        "https://docker.mirrors.ustc.edu.cn",
        "https://docker.nju.edu.cn"
 ]
@iqiancheng
iqiancheng / macos_sequioa_hibernate.md
Last active December 21, 2024 09:32
pmset -g custom

macOS Power Management Guide

Overview

This guide covers power management settings for macOS using the pmset utility, focusing on battery optimization and sleep behavior.

Basic Commands

Check Current Settings

# View all power management settings
@iqiancheng
iqiancheng / README.md
Created December 16, 2024 10:26
调试 GitHub 仓库依赖问题的实用技巧

调试 GitHub 仓库依赖问题的实用技巧

基于时间线的依赖版本排查方法

问题背景

在尝试运行 GitHub 上的开源项目时,我们经常会遇到依赖相关的问题。这些问题通常表现为"No Module Found"错误或找不到特定函数的情况。这主要是因为许多仓库在版本依赖管理方面并不完善。

解决方案

以下是一个基于时间线的实用方法来解决依赖问题:

  1. 确定项目的活跃时期
@iqiancheng
iqiancheng / README.md
Last active December 16, 2024 10:00
macos 手动升级系统 InstallAssistant.pkg macos_sequoia_upgrade_guide.md

Manual MacOS Sequoia Upgrade Guide

Download Instructions

The recommended download page for macOS Sequoia is: iClarified MacOS Download Guide

Download Process

  1. Select the appropriate InstallAssistant.pkg download link based on:
@iqiancheng
iqiancheng / README.md
Created December 16, 2024 09:46
SSH免密登录配置指南 ssh_passwordless_login_guide.md

SSH免密登录配置指南

本文档介绍如何配置SSH免密登录远程开发服务器,通过配置SSH密钥对实现自动登录,提高开发效率和安全性。

前置检查

首先检查是否已经存在SSH密钥:

ls ~/.ssh/id_rsa
@iqiancheng
iqiancheng / multithreading_data_sharing.py
Created November 18, 2024 04:59
Python 中线程共享数据
import threading
import time
from concurrent.futures import ThreadPoolExecutor
import unittest
from dataclasses import dataclass, field
from threading import Lock
import multiprocessing
@dataclass
class SharedData:
@iqiancheng
iqiancheng / script.js
Created September 12, 2024 14:19 — forked from luighifeodrippe/script.js
Download a JSON List of twitter bookmarks
/* Enhancements to the Twitter Scraping Script:
This update to the script introduces a more robust mechanism for extracting detailed interaction data from tweets as they are scraped from Twitter. Previously, the script focused on collecting basic content such as the tweet's text. Now, it has been augmented to include a comprehensive extraction of interaction metrics, including replies, reposts, likes, bookmarks, and views, for each tweet.
Key Changes:
1. Improved Data Extraction:
- The script now searches through all elements within a tweet that have an `aria-label` attribute, filtering for labels that contain key interaction terms (replies, reposts, likes, bookmarks, views). This ensures that only relevant `aria-labels` are considered for data extraction.
2. Flexible Interaction Data Parsing: