Skip to content

Instantly share code, notes, and snippets.

@unixzii
unixzii / ForceEnablingXcodeLLM.md
Last active May 12, 2025 15:12
A guide to force enabling Xcode LLM feature on China-SKU Macs.

Introduction

Apple restricted the access to Xcode LLM (Predictive code completion) feature on China models of Mac. This guide provides a way to bypass that restriction. It's verified on macOS 15.0 Beta (24A5264n), but there is no guarentee that it will always work on later macOS versions.

Prerequisites

  • Xcode is installed and run at least once.
  • SIP debugging restrictions are disabled (via csrutil enable --without debug command in recovery mode).

Disclaimer

#!/bin/bash
# Jenkins Configuraitons Directory
cd $JENKINS_HOME
# Add general configurations, job configurations, and user content
git add -- *.xml jobs/*/*.xml userContent/* ansible/*
# only add user configurations if they exist
if [ -d users ]; then
user_configs=`ls users/*/config.xml`
@ihipop
ihipop / frp systemd.md
Last active November 5, 2024 02:15
FRP systemd 启动脚本 FRP systemd init config
@leowinterde
leowinterde / Gitlab Permissions Fix
Created January 11, 2018 10:21
gitlab-ce permissions fix
# Holds repositories directory
sudo chown -R -v git:root /var/opt/gitlab/git-data
sudo chmod -R -v 0700 /var/opt/gitlab/git-data
# Holds git repositories
sudo chown -R -v git:git /var/opt/gitlab/git-data/repositories
sudo chmod -R -v 2770 /var/opt/gitlab/git-data/repositories
# Holds large object directories
sudo chown -R -v git:gitlab-www /var/opt/gitlab/gitlab-rails/shared
@fire1ce
fire1ce / oh-my-zsh on openwrt or lede-project.md
Last active May 15, 2025 18:58
Install oh-my-zsh on openwrt/lede-project

Install oh-my-zsh on OpenWrt

Install Requirements Packages

opkg update && opkg install ca-certificates zsh curl git-http

Install oh-my-zsh

@jerrylau91
jerrylau91 / api.md
Created July 12, 2016 06:02
12306 API

12306数据接口API(草稿)

简化12306接口,规范属性名称,用于数据库设计,数据接口定义

数据定义

命名规则

@cyrusboadway
cyrusboadway / google-domains-dynamic-dns-update.sh
Created February 20, 2016 17:21
Script to update a Google Domains DNS record
#!/bin/bash
### Google Domains provides an API to update a DNS "Syntheitc record". This script
### updates a record with the script-runner's public IP, as resolved using a DNS
### lookup.
###
### Google Dynamic DNS: https://support.google.com/domains/answer/6147083
### Synthetic Records: https://support.google.com/domains/answer/6069273
USERNAME=""
@ahappyforest
ahappyforest / iptables
Created January 20, 2016 08:21
iptables for ss_redir+chinadns+dnsmasq
#!/bin/sh /etc/rc.common
START=95
start() {
# shadowsocks rules
iptables -t nat -N SHADOWSOCKS
# START
@landys
landys / pre-receive-checkstyle-hook.py
Created November 30, 2015 13:38
The git pre-receive hook for java checkstyle check based on http://bluec0re.blogspot.com/2012/05/git-pre-receive-hook-with-checkstyle.html. Set checkstyle jar and xml with "git config checkstyle.checkfile google_checks.xml" and "git config checkstyle.jar checkstyle-6.12.1-all.jar".
#!/usr/bin/env python
import subprocess
import sys
import tempfile
import shutil
import os
import errno
# variables for checkstyle
@nioe
nioe / HttpHeader.java
Last active January 30, 2024 20:40
Get remote IP from HttpServletRequest
public enum HttpHeader {
AUTHORIZATION("Authorization"),
AUTHENTICATION_TYPE_BASIC("Basic"),
X_AUTH_TOKEN("X-AUTH-TOKEN"),
WWW_Authenticate("WWW-Authenticate"),
X_FORWARDED_FOR("X-Forwarded-For"),
PROXY_CLIENT_IP("Proxy-Client-IP"),
WL_PROXY_CLIENT_IP("WL-Proxy-Client-IP"),
HTTP_CLIENT_IP("HTTP_CLIENT_IP"),
HTTP_X_FORWARDED_FOR("HTTP_X_FORWARDED_FOR");