Skip to content

Instantly share code, notes, and snippets.

@liuran001
liuran001 / config.yaml
Last active December 27, 2024 05:38
mihomo (Clash Meta) 懒人配置
# mihomo (Clash Meta) 懒人配置
# 版本 V1.15-241205
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33
# https://obdo.cc/meta
# 作者: 笨蛋ovo (bdovo.cc)
# Telegram: https://t.me/baka_not_baka
# 关注我的 Telegram 频道谢谢喵 https://t.me/s/BDovo_Channel
# 修改自官方示例规则 https://wiki.metacubex.one/example/#meta
# 转载请保留此注释
# 尽量添加了较为详尽的注释,不理解的地方建议对照 虚空终端 (Clash Meta) Docs 进行理解
@b0gdanw
b0gdanw / Disable-Sequoia-Bloatware.sh
Created November 25, 2024 16:42
Disable Sequoia Bloatware
#!/bin/zsh
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs.
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13), macOS Sonoma (14) and macOS Sequoia (15)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user
@nathanshipley
nathanshipley / img2img_FLUX_ReduxDepth_NS_02_2024-12-09.json
Last active December 27, 2024 05:36
img2img_FLUX_ReduxDepth_NS_02_2024-12-09
{
"last_node_id": 457,
"last_link_id": 804,
"nodes": [
{
"id": 4,
"type": "SetNode",
"pos": [
-433,
2
@Tostino
Tostino / inkbot-chunked-summary.txt
Last active December 27, 2024 05:36
Generate a chunked summary prompt example
<#meta#>
- Date: 2023-10-05
- Task: summary
<#system#>
Your main objective is to condense the content of the document into a concise summary, capturing the main points and themes.
<#chat#>
<#user#>
Please read the provided Original section to understand the context and content. Use this understanding to generate a summary of the Original section, incorporating relevant details and maintaining coherence with the Prior Summary.
Notes:
@FFY00
FFY00 / issue
Created July 3, 2018 20:18
/etc/issue
___-------- '
_ / /________'
/XX( / \ )XXXXXXXXXXX\'
/XXX( O O )XXXXXXXXXXXXXXX\'
/XXX( U ) XXXXXXX\'
/XXXXX( ) XXXXXXXXXXX\'
/XXXXX/ ( O )__ XXXXXX \XXXXX\'
|XXXXX/ / XXXXXX \__ \XXXXX|'
|XXXXXX__/ XXXXXX \______-----'
--___ |XXX__/ XXXXXX \__ /'
@ryansechrest
ryansechrest / php-style-guide.md
Last active December 27, 2024 05:27
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@vwbusguy
vwbusguy / auto-profile-update.sh
Last active December 27, 2024 05:24
Auto Update for power-profiles-daemon
#!/bin/bash
dbus-monitor --system "type='signal',path='/org/freedesktop/UPower/devices/battery_BAT0',member='PropertiesChanged'" | while read LINE; do
echo ${LINE} | grep battery_BAT0 | grep -q PropertiesChanged
if [ $? -eq 0 ]; then
BATT_STAT=$(dbus-send --print-reply=literal --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/devices/battery_BAT0 org.freedesktop.DBus.Properties.Get string:org.freedesktop.UPower.Device string:State | awk '{ print $3; }')
if [ $BATT_STAT -eq 1 ] || [ $BATT_STAT -eq 4 ]; then
LEVEL=$(powerprofilesctl list | grep -q performance && echo "performance" || echo "balanced")
elif [ $BATT_STAT -eq 5 ]; then
LEVEL="balanced"
@Moyf
Moyf / LiteDatabase-en.js
Last active December 27, 2024 05:19
DVJS Code - Lite Database for Obsidian
const useList = false;
const curNote = dv.current();
if (!curNote){
dv.span("The current document is not loaded, please reopen it.");
return;
}
let tarFile = await app.vault.getAbstractFileByPath(curNote.file.path);
// Get the meta data of the current file
const curFileMeta = app.metadataCache.getFileCache(tarFile);
const headings = curFileMeta.headings;
@sam016
sam016 / AllGattCharacteristics.java
Last active December 27, 2024 05:17
Bluetooth GATT Services & Characteristics
package com.sam016.vsflatomation.service.ble;
import java.util.HashMap;
import java.util.UUID;
public class AllGattCharacteristics {
private static HashMap<String, String> attributes = new HashMap();
static {
attributes.put("00002a00-0000-1000-8000-00805f9b34fb", "Device Name");
@raipradeep
raipradeep / Line Graph
Created December 27, 2024 05:12
Line Chart With Canvas In Jetpack Compose
@Composable
fun LineChart(
labelsXAxis: List<String>,
dataPointsYAxis: List<Float>,
modifier: Modifier = Modifier,
textColor: Color = AppTheme.Dark,
axisSpacing: Float = 60f,
maxDataPoints: Int = 35// Count for X Axis Data
) {