This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import argparse | |
| import json | |
| from pyOSC import OSC | |
| from SimpleWebSocketServer import WebSocket, SimpleWebSocketServer | |
| # arguments |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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(). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # sh gifenc.sh input.mp4 output.gif | |
| # Optionally accepts width / height (one or both). | |
| palette="/tmp/palette.png" | |
| filters="fps=15" | |
| if [ -n "$3" ]; then | |
| if [ -n "$4" ]; then | |
| filters="$filters,scale=$3:$4" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // C/C++ tips for using printf-style functions | |
| // Lots of manipulation can be expressed simply and fast with printf-style formatting | |
| // Also helps reducing the number of temporaries, memory allocations or copies | |
| // ( If you are looking for a simple C++ string class that is printf-friendly and not heap-abusive, | |
| // I've been using this one: https://github.com/ocornut/Str ) | |
| // If you are interested in a FASTER implementation of sprintf functions, see stb_sprintf.h | |
| // https://github.com/nothings/stb/blob/master/stb_sprintf.h | |
| // How to concatenate non-zero terminated strings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Simple: | |
| # a --> b | |
| # --> c --> d | |
| # --> d | |
| graph1 = { | |
| "a": ["b", "c", "d"], | |
| "b": [], | |
| "c": ["d"], | |
| "d": [] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Navigation: | |
| cmd-p Goto Anything ('@' for functions, ':' for line number) | |
| cmd-r Function finder | |
| ctl-g Goto line number | |
| cmd-sft-p Command palette | |
| cmd-sft-f Find in Files | |
| cmd-opt-r Toggle regex when finding | |
| cmd-opt-# Columns | |
| ctr-# Switch columns |
NewerOlder