Skip to content

Instantly share code, notes, and snippets.

@mohd-akram
mohd-akram / icloud-download
Created September 22, 2020 19:56
A script to download files and directories from iCloud Drive
#!/usr/bin/env python3
# Install
# 1. Install dependency: `pip3 install --user pyicloud`
# 2. Sign in to iCloud: `icloud --username [email protected]`
# 3. Copy file to somewhere in your `PATH`
# 4. Add `alias icloud-download="[email protected] icloud-download"`
# to ~/.profile or ~/.bashrc, etc
# 5. Use via eg. `icloud-download Documents/folder`
# which will download `folder` to your current directory
#! uv -n run
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "draive[gemini]~=0.49.1",
# ]
# ///
from asyncio import run
@MyrikLD
MyrikLD / config.jsonc
Last active April 2, 2025 19:35
Waybar module for controlling brightness of an external display
//ddcutil version
"custom/brightness": {
"format": "{icon} {percentage}%",
"format-icons": ["\uDB80\uDCDE", "\uDB80\uDCDF", "\uDB80\uDCE0"],
"return-type": "json",
"exec": "ddcutil --bus 7 getvcp 10 | grep -oP 'current.*?=\\s*\\K[0-9]+' | { read x; echo '{\"percentage\":'${x}'}'; }",
"on-scroll-up": "ddcutil --noverify --bus 7 setvcp 10 + 10",
"on-scroll-down": "ddcutil --noverify --bus 7 setvcp 10 - 10",
"on-click": "ddcutil --noverify --bus 7 setvcp 10 0",
"on-click-right": "ddcutil --noverify --bus 7 setvcp 10 100",
@AdamMarsden
AdamMarsden / zshgit.md
Last active April 2, 2025 19:35
Oh My Zsh - Git Cheat Sheet

#Oh My Zsh - Git Cheat Sheet

ggit

gstgit status

glgit pull

gupgit pull --rebase

var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@ruvnet
ruvnet / .clinerules
Last active April 2, 2025 19:34
SPARC Cursor/Cline Rules guide structured agentic coding through simplicity, iteration, clear documentation, symbolic reasoning, rigorous testing, and focused AI-human collaboration, ensuring maintainable, secure, high-quality outcomes.
# SPARC Agentic Development Rules
Core Philosophy
1. Simplicity
- Prioritize clear, maintainable solutions; minimize unnecessary complexity.
2. Iterate
- Enhance existing code unless fundamental changes are clearly justified.
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active April 2, 2025 19:30
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@Vogtinator
Vogtinator / README.md
Last active April 2, 2025 19:27
Run Win11 on ARM in QEMU

Guide updated to use the official installation .iso from Microsoft, which finally became available in Dec. 2024! For the VHDX disk image based guide check an earlier version of this gist.

When following this guide on a host not capable of aarch64 virtualization, replace -cpu host -accel kvm with -cpu max.

  1. Download the installation .iso from https://www.microsoft.com/en-us/software-download/windows11arm64. Win11_24H2_EnglishInternational_Arm64.iso is known to work.
  2. Download the the latest virtio-win.iso from https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/.
  3. Create a disk image for the Windows installation: qemu-img create -f qcow2 win11.qcow2 25G
  4. Start the installation with generic (ramfb for display, usb-storage for .isos) as well as virtio (virtio-gpu-pci, virtio-block) devices: `qemu-system-aarch64 -M virt -cpu host -accel kvm -m 4G -smp 4 -device ramfb -device virtio-gpu-pci -bios /usr/share/qemu/qemu-uefi-aarch64.bin -device qemu-xhci -device usb-kbd -dev
@Udara-Dananjaya
Udara-Dananjaya / MacOS-Xampp-Instalation-Guide.md
Last active April 2, 2025 19:26
macOS XAMPP Installation and Composer Setup Guide

Step-by-step instructions for installing XAMPP, configuring paths, and installing Composer on macOS:

Install XAMPP:

  1. Go to XAMPP download page and download the DMG file.
  2. Open the downloaded DMG file.
  3. Press F4 and search for "Privacy and Security."
  4. In the "Security" section, you'll find the blocked app. Click "Open Anyway" to continue with the installation.
  5. Start the XAMPP services.
@Beyarz
Beyarz / guide.md
Last active April 2, 2025 19:26
Install the Apache Web Server on Ubuntu

Install apache web server

sudo apt update

sudo apt install apache2

List the ufw application profiles by typing:

sudo ufw app list