Skip to content

Instantly share code, notes, and snippets.

@OrionReed
OrionReed / dom3d.js
Last active April 19, 2025 12:06
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@Jxck-S
Jxck-S / nostr_post.py
Last active October 5, 2024 20:54
Post to nostr from Python, with helpful info on how to post a photo
import json
import ssl
import time
from nostr.event import Event
from nostr.relay_manager import RelayManager
from nostr.message_type import ClientMessageType
from nostr.key import PrivateKey
def nostr_post(note, private_key, image_url=None):
if image_url:
@jaircuevajunior
jaircuevajunior / shrink_xenserver_vm_disk.md
Last active January 22, 2023 10:20
Shrinking XenServer VDI VM Disk

Shrinking XenServer VDI VM Disk

XenServer doesn't allow us to do this kinda shrinking so we better recreate the vm copying all the files and recreating grub (boot) files.

1. Prepare the new disk

  • Create a Virtual Disk with the final desired size (eg our running vm disk has currently 100G and we want to shrinkg it to 80G so this new disk is gonna be 80G)
  • Attach the new disk to the running VM. (For this we'll need to shutdown the vm for a brief moment and power up it back again)
  • Under the VM terminal we format the new disk:
fdisk /dev/xvdb #(n, p, ...) DON'T FORGET TO CREATE THE SWAPP PARTITION!!!
mkfs.ext4 /dev/xvdb1
@mchubby
mchubby / ddc-ci-u2713hm.py
Last active October 3, 2024 09:18 — forked from Fr6jDJF/ddc-ci.py
Python script for adjusting the settings of my monitor, by using DDC/CI
#!/usr/bin/env python3
"""
Show and adjust display parameters on a Dell U2713HM monitor
Requirements:
- mentioned monitor (27' should also work) with DDC/CI setting on
- Windows Vista+ (dxva2.dll)
- Python 3
@vielhuber
vielhuber / README.MD
Last active April 18, 2025 14:39
ffmpeg: Video convert m2ts to mp4, mp4 to webm, mp4 to ogv, mp3 wav hz, extract frames #tools

video convert m2ts to mp4, mp4 to webm, mp4 to ogv

mp4 to mp4 (medium)

ffmpeg -i input.mp4 -b 1000000 output.mp4

m2ts to mp4

ffmpeg -i input.m2ts -vcodec libx264 -crf 20 -acodec ac3 -vf "yadif" output.mp4
@rxaviers
rxaviers / gist:7360908
Last active April 25, 2025 05:50
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: