Skip to content

Instantly share code, notes, and snippets.

@xenogenesi
xenogenesi / Makefile
Last active February 23, 2023 16:16
Simple QOpenGLWidget (Qt6/Qt5) test, draw an rgb triangle, handle mouse events (press, move and wheel)
all: main
USE_QT = 5
ifeq ($(USE_QT), 6)
QT6_CXXFLAGS = -I/usr/include/x86_64-linux-gnu/qt6
QT_CXXFLAGS = $(QT6_CXXFLAGS)
<?php
/**
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
@xenogenesi
xenogenesi / blender-mocap-constraint.py
Last active January 5, 2021 02:05
Blender script to re-target motion capture
bl_info = {
"name": "Rig Empty Retarget",
"blender": (2, 91, 0),
"author": "Alex <[email protected]>",
"version": (0, 1),
"category": "Rigging",
"location": "Operator Search",
"description": "Helpers to re-target animations",
"warning": "",
"doc_url": "",
@xenogenesi
xenogenesi / Dockerfile.build-pytorch
Created November 16, 2020 06:52
WIP Try (and fail) to build pytorch 1.0.0 cuda 10.2 cudnn 7.6 with support for old gpu 3.0
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates apt-transport-https gnupg-curl && \
rm -rf /var/lib/apt/lists/* && \
NVIDIA_GPGKEY_SUM=d1be581509378368edeec8c1eb2958702feedf3bc3d17011adbf24efacce4ab5 && \
NVIDIA_GPGKEY_FPR=ae09fe4bbd223a84b2ccfce3f60f4b3d7fa2af80 && \
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub && \
apt-key adv --export --no-emit-version -a $NVIDIA_GPGKEY_FPR | tail -n +5 > cudasign.pub && \
echo "$NVIDIA_GPGKEY_SUM cudasign.pub" | sha256sum -c --strict - && rm cudasign.pub && \
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \
diff --git a/dialogs/exportdialog.cpp b/dialogs/exportdialog.cpp
index d6899f66..ac13fa0e 100644
--- a/dialogs/exportdialog.cpp
+++ b/dialogs/exportdialog.cpp
@@ -65,6 +65,9 @@ enum ExportFormats {
FORMAT_WAV,
FORMAT_WEBM,
FORMAT_WMV,
+#ifdef EXPORT_POPEN
+ FORMAT_RAWPIPE,
@xenogenesi
xenogenesi / .dockerignore
Last active December 13, 2023 14:44
Docker file for Wav2Lip
# Ignore everything
**
# Allow files and directories
!/audio.py
!/Dockerfile
!/hparams.py
!/preprocess.py
!/checkpoints/
!/evaluation/
# tested with blender 2.83.5
# some dependency is required: dlib imutils opencv numpy
import bpy
import os
# hack to get imutils to work
import sys; sys.path.insert(0, os.getenv('HOME') + "/.local/lib/python3.8/site-packages")
from imutils import face_utils
@xenogenesi
xenogenesi / nitrogenrnd.nim
Created April 9, 2020 18:24
nitrogen random configuration for two screen in nim
import os,
re,
strformat,
random
var bgDir = ""
if paramCount() > 0:
bgDir = paramStr(1)
else:
echo "usage: nitrogenrnd [directory]"
diff --git a/src/HexEditor.cpp b/src/HexEditor.cpp
index 365d904..e2bfb24 100644
--- a/src/HexEditor.cpp
+++ b/src/HexEditor.cpp
@@ -922,6 +922,14 @@ void HexEditor::OnKeyboardInput( wxKeyEvent& event ) {
*/
break;
+ case (0x52):
+ if( event.ControlDown() ){
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-si