Skip to content

Instantly share code, notes, and snippets.

@Kyle-Ye
Kyle-Ye / XcodeLLM.md
Last active January 3, 2025 12:10
Enable XcodeLLM for ChinaSKU Mac on macOS 15 Beta 1

Warning

The following guide need to disable SIP to work.

Please confirm the risk of disabling the SIP by yourself.

Another solution which does not require disabling SIP is currently under investigation.

Step 0

Reboot into Recovery OS + Disable SIP

@marccarre
marccarre / list_kindle_releases.py
Created October 24, 2020 08:46
List all available versions of Kindle for Mac and Kindle for PC.
#!/usr/bin/env python
'''
List all available versions of Kindle for Mac and Kindle for PC.
Dependencies:
- asyncio==3.4.3
- aiohttp==3.6.3
'''
import os
import sys
@fernandoaleman
fernandoaleman / install-rabbitmq-centos-7.md
Last active December 12, 2024 12:38
Install RabbitMQ on CentOS 7

Install RabbitMQ on CentOS 7

sudo yum -y install epel-release
sudo yum -y update

Install Erlang

Download repository

@jepers
jepers / hexdump.swift
Last active April 14, 2019 11:15
Like hexdump -C but in Swift 4.1
import Foundation
/// Writes a canonical hex+ASCII representation of `bytes` into `output`.
func hexdump<Target>(_ bytes: UnsafeRawBufferPointer, to output: inout Target)
where Target: TextOutputStream
{
guard bytes.count > 0 else { return }
var asciiString = ""
@lattner
lattner / TaskConcurrencyManifesto.md
Last active April 22, 2025 01:00
Swift Concurrency Manifesto
@timdown
timdown / trim_canvas.js
Created July 26, 2017 16:15
Returns a copy of a canvas element with surrounding transparent space removed
var trimCanvas = (function() {
function rowBlank(imageData, width, y) {
for (var x = 0; x < width; ++x) {
if (imageData.data[y * width * 4 + x * 4 + 3] !== 0) return false;
}
return true;
}
function columnBlank(imageData, width, x, top, bottom) {
for (var y = top; y < bottom; ++y) {