Skip to content

Instantly share code, notes, and snippets.

@pirate
pirate / udm_fancontrol_setup.sh
Created June 4, 2024 10:34
Setup Unifi Dream Machine (UDM, UDM-SE, etc.) automatic fan speeds control to lower temps and increase hard drive lifespan.
#!/bin/bash
# Installs and configures fancontrol to automatically run Unifi Dream Machine (UDM) fans harder & lower temperatures.
#
# Context: Unifi equipment typically runs *very* hot from the factory unless you customize it.
# I don't want my hard drives to run as hot as they let them get by default (55ºC+), because it shortens lifespan (ideal temp is ~35-45C).
#
# Further Reading:
# - https://linux.die.net/man/8/fancontrol
# - https://community.ui.com/questions/Unifi-Dream-Router-fan-speed/1cb9cf18-e8a0-44b4-8402-ee9bac367bc0
# - https://www.reddit.com/r/Ubiquiti/comments/13imgqj/udm_pro_fan_speed_is_this_normal/
@johngagefaulkner
johngagefaulkner / xsts.md
Last active January 7, 2025 02:38 — forked from Jaren8r/xsts.md
Xbox XSTS Login Flow

Xbox Live Authentication Token (XSTS)

Step 1: Obtaining an Access Token

Before you begin, you must have an access token from live. You can get one by clicking here.

You are also able to use your own Microsoft Azure application by requesting an access token with the XboxLive.signin scope. If you go this route, you must prefix your access token with d= when passing it to xbox.


@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 7, 2025 02:36
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@zsprackett
zsprackett / lightControl.ts
Last active January 7, 2025 02:36
Interact with the amaran Desktop app via WebSocket to control lights.
/*
MIT License
Copyright (c) 2024 S. Zachariah Sprackett <zac@sprackett.com>
Control Aputure Amaran Lights via websocket to the amaran Desktop application.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
@graydon
graydon / country-bounding-boxes.py
Created April 23, 2014 00:03
country bounding boxes
# extracted from http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip
# under public domain terms
country_bounding_boxes = {
'AF': ('Afghanistan', (60.5284298033, 29.318572496, 75.1580277851, 38.4862816432)),
'AO': ('Angola', (11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998)),
'AL': ('Albania', (19.3044861183, 39.624997667, 21.0200403175, 42.6882473822)),
'AE': ('United Arab Emirates', (51.5795186705, 22.4969475367, 56.3968473651, 26.055464179)),
'AR': ('Argentina', (-73.4154357571, -55.25, -53.628348965, -21.8323104794)),
'AM': ('Armenia', (43.5827458026, 38.7412014837, 46.5057198423, 41.2481285671)),
@holazt
holazt / IP-DNS-swift-switch.cmd
Created January 7, 2017 05:05
Windows 下 IP 和 DNS 快速切换(批处理)
@echo off
title IP 和 DNS 快速切换
color 0a
rem 以下几个参数用户自行配置
rem name这个值,是你电脑网络连接的名称,
rem 需要到网络适配器中去查看
rem 大部分name值都是”本地连接”,
@AndreiTelteu
AndreiTelteu / Laravel stream large file with buffer .php
Created February 7, 2023 21:50
Laravel stream large file from disk with buffer.
<?php
// inspired by https://github.com/imanghafoori1/laravel-video
// if you need this for video, this does not support seek.
// laravel-video supports seek and chunks, so use that for video.
Route::get('/big-file-stream', function () {
$filePath = \Storage::disk('local')->path('video.mp4');
$fileStream = \Storage::disk('local')->readStream('video.mp4');
@ricardoalcocer
ricardoalcocer / learning_guitar.md
Last active January 7, 2025 02:29
Learning Guitar

A Hacker's Guide to learning rhythm and lead guitar FAST!

I've been playing guitar for over 30 years. I never took formal lessons - only ocassional ones targeted to a specific topic. I love the discovery process and the relationship I've created with the instrument.

Five years ago or so, I had an a-ha moment, which fundamentaly changed the way I approach my learning of the guitar. After internalizing all the content I consumed, I thing I've come up with a formula for learning both rhythm and lead guitar in a very streamlined and systematic fashion. This method will teach you how to find chords across the entire fretboard so you can create chord progresssions for your own songs, or to make it easier to figure out the chords of your favorite songs.

However, what I like the most about it is that it gets you ready to play lead guitar, without putting too much emphasis on the pentatonic scale. Also, it teaches the guitar from the standpoint of understanding its symetry, and dare I say, the mathematics