Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery => Vanilla JS</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
@mondain
mondain / public-stun-list.txt
Last active May 3, 2024 01:47
Public STUN server list
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478
@adrienjoly
adrienjoly / free-youtube-art-track-tutorial.md
Last active May 3, 2024 01:47
Create a YouTube Art Track for free using HTML, CSS and ffmpeg

Create a YouTube Art Track using HTML, CSS and ffmpeg

This may be more of a recipe than a tutorial, but let me just share the steps I followed to generate YouTube Art Track for my band, using intermediate computer skills.

Motivation

As a musician, sharing your music on YouTube is a must. But YouTube is a video platform, and making a music video to go with a song can be costly and time consuming. Several web services propose to generate a nice looking video out of your MP3 file, and to upload the result directly to your YouTube account, but this would cost you $30 per song in HD quality.

Expected output

@olasd
olasd / stream_to_youtube.sh
Created March 28, 2014 19:58
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
@jchv
jchv / recover-sway-socket.md
Last active May 3, 2024 01:43
How to recover your SwayWM socket in an SSH session.

How to recover your SwayWM socket in an SSH session.

I've run into a strange problem where sometimes, my monitors are forced to DPMS off and moving the cursor or pressing keys does not free it. I suspect this is a bug in my SwayWM configuration or a bug in Swaylock, but it resolves itself if I wait until the device again locks, which causes a second Swaylock instance to appear.

In any case, if you get yourself stuck and need to recover, you might want to be able to run swaymsg remotely. If you do, you might run into strange issues. swaymsg calls sway --get-socketpath to get the IPC socket, which... just returns the value of the SWAYSOCK environment variable. In my case, this also has the funny side-effect of starting a dbus session and SSH agent each time its invoked, because it is calling the NixOS-wrapped SwayWM binary. Probably should patch the NixOS version to explicitly call the unwrapped binary!

In order to recover the SWAYSOCK, one approach that should be relatively easy and does not requ

@LotteMakesStuff
LotteMakesStuff / HighlightAttribute.cs
Last active May 3, 2024 01:38
Having trouble finding the right property on a component cos theres just so many identical looking fields? Add some color to you inspectors! mark important property with a bright color so it always stands out, or supply a validation function so highlights show on values that would effect the current ingame logic!
// NOTE DONT put in an editor folder
using UnityEngine;
public class HighlightAttribute : PropertyAttribute
{
public HighlightColor Color;
public string ValidateMethod;
public object Value;
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 3, 2024 01:37
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@sircharlo
sircharlo / immich-orphan-cleaner.py
Last active May 3, 2024 01:36
I modified @T-One 's excellent Gist somewhat for my purposes: I had alot of orphaned files in my Immich instance! I was getting impatient and wanted to see progress and ETA. Here it is in case anyone is impatient like me lol; all credit goes to @T-One though. Original Gist: https://gist.github.com/T-One/c857005e58286149914ad38f24a891e1
#!/usr/bin/env python3
# Note: you might need to run "pip install halo tabulate tqdm" if these dependencies are missing on your machine
import argparse
import json
import requests
from datetime import datetime
from halo import Halo
@pablotolentino
pablotolentino / Visual Studio 2022 Product Key
Created November 20, 2021 20:41
Visual Studio 2022 Enterprise Product key
Visual Studio 2022
Enterprise :
VHF9H-NXBBB-638P6-6JHCY-88JWH
Professional:
TD244-P4NB7-YQ6XK-Y8MMM-YWV2J
@matthewaveryusa
matthewaveryusa / grab_io_kbm.c
Created May 20, 2016 03:13
linux grab io from keyboard and mouse
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <linux/input.h>
#include <time.h>
#include <stdint.h>
int main(int argc, char* argv[]){
sleep(1);