Skip to content

Instantly share code, notes, and snippets.

View 0x77dev's full-sized avatar
:shipit:

Mykhailo Marynenko 0x77dev

:shipit:
View GitHub Profile
@0x77dev
0x77dev / NIX_MACOS_15_SEQUIOA_FIRST_BUILD_UID.md
Last active August 8, 2024 06:31
Install Nix on macOS 15.0

I got an issue installing Nix on latest macOS 15.0 (Sequioa), looks like 3xx uids are reserved by some new built-in users.

This should fix your issue: NIX_FIRST_BUILD_UID=600

@atinux
atinux / sse.ts
Last active May 2, 2025 06:02
SSE endpoint example with Nuxt 3
// ~/server/api/sse.ts
export default defineEventHandler(async (event) => {
if (!process.dev) return { disabled: true }
// Enable SSE endpoint
setHeader(event, 'cache-control', 'no-cache')
setHeader(event, 'connection', 'keep-alive')
setHeader(event, 'content-type', 'text/event-stream')
setResponseStatus(event, 200)
@HimDek
HimDek / Hyper-V in Windows 10 and Windows 11 Home Edition.md
Last active June 19, 2025 14:12
Hyper-V is supported in Pro, Enterprise and Education Edition of Windows 10 and Windows 11. This guide will show you how to enable Hyper-V in Home Editions of Windows 10 and Windows 11.

Hyper-V in Windows 10 and Windows 11 Home Edition

Hyper-V in Windows 10 and Windows 11 allows running Virtual Machine. It is supported only in Pro, Enterprise and Education Edition of Windows 10 and Windows 11 by default. But this guide will show you how to enable it in Home Editions of Windows 10 and Windows 11.

Check if virtualization is enabled:

  • Search for Command Prompt in Windows Start Menu and open it.
  • Type systeminfo and press Enter. Wait for the process to finish
  • Once the results appear, search for the Hyper-V Requirements section which is usually the last one. 11
    • If it says A hypervisor has been detected. Features required for Hyper-V will not be displayed. that means Hyper-V is already enabled and there is no reason following this guide anymore.
  • Otherwise, check for Virtualization Enabled in Firmware:.
@sindresorhus
sindresorhus / esm-package.md
Last active June 28, 2025 20:09
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@ifyour
ifyour / aria2.conf
Last active December 3, 2023 16:36
Aria2c Configuration Best Practices
## Disk Settings ##
dir = ${HOME}/Downloads
daemon = false
enable-mmap = true
disk-cache = 64M
file-allocation = none
## Download Settings ##
continue = true
split = 16
@0x77dev
0x77dev / README.md
Last active May 18, 2021 11:01
Install SSH keys from GitHub

Install SSH keys from GitHub

This script installs your public ssh keys from GitHub to your ~/.ssh/authorized_keys.

Example

$ curl -L https://git.io/JTZHT | bash -s 0x77dev

Usage

// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: blue; icon-glyph: bus-alt;
// Script to show real time SL departure information using the SL real-time API https://www.trafiklab.se/node/15754/documentation
// Todo: Pass siteID and StopPointNumber as arguments
const siteID = "9001" // 9001 is T-Centralen, replace with your station's ID. See: https://www.trafiklab.se/api/sl-platsuppslag/dokumentation
const myKey = "thekey" // Replace with your key, get it from https://www.trafiklab.se/api/sl-platsuppslag
const timeWindow = "30" // Show departures in the next 30 minutes
@0x77dev
0x77dev / cloudSettings
Last active September 3, 2020 22:01
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-09-03T22:01:49.199Z","extensionVersion":"v3.4.3"}
@qzm
qzm / aria2.conf
Last active June 10, 2025 12:08
Best aria2 Config
### Basic ###
# The directory to store the downloaded file.
dir=${HOME}/Downloads
# Downloads the URIs listed in FILE.
input-file=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to FILE on exit.
save-session=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits. Default: 0
save-session-interval=60
# Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5
@whiskerz007
whiskerz007 / gist:53c6aa5d624154bacbbc54880e1e3b2a
Last active May 7, 2025 13:39
How to setup a community version of Proxmox VE 5.x-6.x
# Disable Commercial Repo
sed -i "s/^deb/\#deb/" /etc/apt/sources.list.d/pve-enterprise.list
apt-get update
# Add PVE Community Repo
echo "deb http://download.proxmox.com/debian/pve $(grep "VERSION=" /etc/os-release | sed -n 's/.*(\(.*\)).*/\1/p') pve-no-subscription" > /etc/apt/sources.list.d/pve-no-enterprise.list
apt-get update
# Remove nag
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" > /etc/apt/apt.conf.d/no-nag-script