Skip to content

Instantly share code, notes, and snippets.

View aniongithub's full-sized avatar

Ani aniongithub

View GitHub Profile
@kriNon
kriNon / Mixamo.js
Last active January 28, 2024 12:56
// Mixamo Animation downloadeer
// The following script make use of mixamo2 API to download all anims for a single character that you choose.
// The animations are saved with descriptive long names instead of the short ones used by default by mixamo UI.
//
// This script has been written by gnuton@gnuton.org and the author is not responsible of its usage
//
// How to use this script
// 1. Browse mixamo.com
// 2. Log in
// 3. Open JS console (F12 on chrome)
@andrebrait
andrebrait / keychron_linux.md
Last active April 25, 2024 13:24
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@ScatteredRay
ScatteredRay / hostnamegen.service
Last active July 1, 2020 22:06
Systemd unique hostname
[Unit]
Description=Generate Unique Hostname
DefaultDependencies=no
Wants=local-fs.target swap.target network-pre.target
After=local-fs.target swap.target
Before=network-pre.target
ConditionPathExists=!/etc/hostname
ConditionPathExists=!/boot/hostname
[Service]
@DGriffin91
DGriffin91 / simple_imgui_example.py
Last active April 4, 2024 06:39
A simple pyimgui example using the GLFW backend
#pip install imgui[glfw]
import imgui
import glfw
import OpenGL.GL as gl
from imgui.integrations.glfw import GlfwRenderer
def impl_glfw_init(window_name="minimal ImGui/GLFW3 example", width=1280, height=720):
if not glfw.init():
print("Could not initialize OpenGL context")
@EEmmanuel7
EEmmanuel7 / index.html
Created March 29, 2020 23:45
Three.js+ImGui JavaScript
<canvas id="output"></canvas>
@tobiasfriden
tobiasfriden / Dockerfile
Last active March 27, 2024 09:30
Gstreamer WebRTC python demo working Dockerfile
FROM maxmcd/gstreamer:1.14-buster
WORKDIR /usr/src
RUN apt-get update && apt-get install -y python3-pip \
pkg-config \
libcairo2-dev \
gcc \
python3-dev \
libgirepository1.0-dev \
@dmfigol
dmfigol / asyncio_loop_in_thread.py
Last active April 21, 2024 17:32
Python asyncio event loop in a separate thread
"""
This gist shows how to run asyncio loop in a separate thread.
It could be useful if you want to mix sync and async code together.
Python 3.7+
"""
import asyncio
from datetime import datetime
from threading import Thread
from typing import Tuple, List, Iterable
@WesThorburn
WesThorburn / 1.Instructions.md
Last active March 14, 2024 22:11
Linux: Compile C++ to WebAssembly and JavaScript using Emscripten and CMake

Linux: Compile C++ to WebAssembly and JavaScript using Emscripten and CMake

Download and Install Emscripten

  • My preferred installation location is /home/user
  • Get the latest sdk: git clone https://github.com/emscripten-core/emsdk.git
  • Enter the cloned directory: cd emsdk
  • Checkout main: git checkout main
  • Install the lastest sdk tools: ./emsdk install latest
  • Activate the latest sdk tools: ./emsdk activate latest
  • Activate path variables: source ./emsdk_env.sh
@gnuton
gnuton / Mixamo.js
Last active January 22, 2024 07:29
Script which downloads all mixamo animations for one character.
// Mixamo Animation downloadeer
//
// Author: Antonio Aloisio <gnuton@gnuton.org>
// Contributions: kriNon
//
// The following script make use of mixamo2 API to download all anims for a single character that you choose.
// The animations are saved with descriptive long names instead of the short ones used by default by mixamo UI.
//
// This script has been written by gnuton@gnuton.org and the author is not responsible of its usage
//

#Setting up Docker Machine on Raspberry PI

  1. SSH into the pi and install docker with curl -sSL https://get.docker.com | sh (If we let Machine try to install the Docker daemon it will fail.)
  2. Change the OS's ID so Docker Machine won't throw errors. sudo nano /etc/os-release and change the line that says ID=raspbian to ID=debian
  3. From a new terminal window run docker-machine create --driver generic --generic-ip-address YOUR-PIS-IP --generic-ssh-key ~/.ssh/id_rsa --generic-ssh-user pi --engine-storage-driver overlay2 MACHINE-NAME