Skip to content

Instantly share code, notes, and snippets.

@piyusht007
piyusht007 / test.html
Created June 11, 2020 10:32
Role checking Cheatsheet in Spring security and Thymeleaf
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<div>
<b>Username:</b>
<div sec:authentication="name">
The value of the "name" property of the authentication object should appear here.
</div>
</div>
<div>
<b>User Roles: </b>
@aabiji
aabiji / yt.py
Created April 7, 2024 15:39
Youtube video downloader
"""
A tiny youtube video downloader.
usage: yt.py [-h] [--only-audio] [--num_retries NUM_RETRIES] [--output OUTPUT] video_url
Built by Abigail Adegbiji on April 7, 2024.
Inspried by this blog post: https://tyrrrz.me/blog/reverse-engineering-youtube-revisited
Note that the get_video_info function will be subject to change when Youtube changes their api.
Also note that ffmpeg and ffmpeg-python are required dependencies.
"""
@ocornut
ocornut / imgui_node_graph_test.cpp
Last active April 23, 2024 19:02
Node graph editor basic demo for ImGui
// Creating a node graph editor for Dear ImGui
// Quick sample, not production code!
// This is quick demo I crafted in a few hours in 2015 showcasing how to use Dear ImGui to create custom stuff,
// which ended up feeding a thread full of better experiments.
// See https://github.com/ocornut/imgui/issues/306 for details
// Fast forward to 2023, see e.g. https://github.com/ocornut/imgui/wiki/Useful-Extensions#node-editors
// Changelog
// - v0.05 (2023-03): fixed for renamed api: AddBezierCurve()->AddBezierCubic().
@silverkorn
silverkorn / ffmpeg-nonfree-build-ubuntu-16.04.sh
Last active April 23, 2024 19:02
An automated script to build FFmpeg non-free on Debian/Ubuntu with as much features as possible. (Including mediainfo for debugging) Raw
# TODO: Verify to link statically some dependencies usually not available in a default instllation of RHEL/CentOS (ex.: libxcb)
###################
## Configuration ##
###################
FFMPEG_CPU_COUNT=$(nproc)
FFMPEG_ENABLE="--enable-gpl --enable-version3 --enable-nonfree --enable-runtime-cpudetect --enable-gray --enable-openssl --enable-libfreetype"
FFMPEG_HOME=/usr/local/src/ffmpeg
@nmpowell
nmpowell / windows_task_scheduler.py
Last active April 23, 2024 19:00
Python script to interact with existing Windows Task Scheduler tasks.
"""
Python script to interact with existing Windows Task Scheduler tasks.
CLI usage:
python windows_task_scheduler.py {enable|disable|run} -t "TaskName"
import usage:
import windows_task_scheduler as wts
wts.enable_task(task_name='TaskName')
wts.disable_task(task_name='TaskName')

Hyper-converged High Available Homelab with Proxmox

This is me documenting my journey moving my Homelab from a Qnap NAS and a Single host Proxmox server to a Hyper-converged multi-node Proxmox Cluster.

The reason to document it here is twofold:

  1. Information often it scattered 'all over the place', but never 100% applicable to the setup I have.
  2. To remember 'what the fuck' did I do some months ago.
  3. Writing it for 'a public' forces me to think it all through again and make sure it's correct.

It's written 'first to scratch my own itch' but hopefully it benefits others too, or even better, that others improve upon my implementations. Feel free to comment or share improvements and insights!

@kralicky
kralicky / harvester-gpu.md
Last active April 23, 2024 18:56
Harvester GPU Provisioning

Harvester GPU Provisioning

  1. Install Harvester, then SSH into the server.

  2. Edit /boot/grub/grub.cfg as follows:

 set default=0
 set timeout=10
 
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2D Airplane Game</title>
<style>
canvas {
border: 1px solid black;
}