Skip to content

Instantly share code, notes, and snippets.

Avatar

Dov Grobgeld dov

  • Rehovot, Israel
View GitHub Profile
@dov
dov / compile_commands.json
Created Oct 5, 2022
Continue debugging clang and eglot
View compile_commands.json
This file has been truncated, but you can view the full file.
[
{
"directory": "/terra/space/pub-repos/PacktPublishing/3D-Graphics-Rendering-Cookbook/build",
View eglot-buffer.txt
[internal] Wed Oct 5 23:20:01 2022:
(:message "Running language server: (clangd -j 1 --log=verbose)")
[client-request] (id:1) Wed Oct 5 23:20:01 2022:
(:jsonrpc "2.0" :id 1 :method "initialize" :params
(:processId 16719 :rootPath "/terra/space/pub-repos/PacktPublishing/3D-Graphics-Rendering-Cookbook/" :rootUri "file:///terra/space/pub-repos/PacktPublishing/3D-Graphics-Rendering-Cookbook" :initializationOptions #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8125 data
())
:capabilities
(:workspace
(:applyEdit t :executeCommand
(:dynamicRegistration :json-false)
@dov
dov / dummy
Created Sep 8, 2022
An image gist
@dov
dov / cite-convert.py
Created Dec 20, 2021
Freeformat to bibtex conversion
View cite-convert.py
#!/usr/bin/python
######################################################################
# A script to convert from "free format" citations in my
# daughter's to bib-tex convention.
#
# Dov Grobgeld <dov.grobgeld@gmail.com>
# 2021-12-18 Sat
######################################################################
@dov
dov / ReadMe.md
Created Jul 4, 2021
paps vs emacs example
View ReadMe.md

Intro

This gist contains images showing off paps on the emacs HELLO file.

@dov
dov / label_to_color.py
Created May 5, 2021
How to color a label image in python
View label_to_color.py
#!/usr/bin/python
######################################################################
#
# An example of how to color code a gray level label image in
# python.
#
# 2021-05-05 Wed
# Dov Grobgeld <dov.grobgeld@gmail.com>
######################################################################
@dov
dov / Makefile
Created May 2, 2021
A Vulkan renderheadless example with two render passes (not working)
View Makefile
# Minimal makefile for multipass-minimal
%.o : %.cpp
g++ -o $@ -c -Wall -g -std=c++17 $?
multipass-minimal: multipass-minimal.o VulkanTools.o
g++ -o $@ $? -lglfw -lvulkan
clean:
$(RM) multipass-minimal.o multipass-minimal
@dov
dov / create_triangle_gltf.cpp
Created Feb 25, 2021
Example of how to build a gltf file from scratch with tiny_gltf.h
View create_triangle_gltf.cpp
// An example of how to generate a gltf file from scratch. This example
// was translated from the pygltlib documentation in the pypi project page,
// which in turn is based on the Khronos Sample Models at:
//
// https://github.com/KhronosGroup/glTF-Sample-Models
//
// This example is released under the MIT license.
//
// 2021-02-25 Thu
// Dov Grobgeld <dov.grobgeld@gmail.com>
@dov
dov / svg_path_writer.py
Created Feb 6, 2021
A simple svg writer in python for paths
View svg_path_writer.py
# A simple svg writer for paths
#
# This example is in the public domain
#
# 2021-02-06 Sat
# Dov Grobgeld <dov.grobgeld@gmail.com>
def moveto(x,y): return f'M {x},{y}'
def lineto(x,y): return f'L {x},{y}'
def closepath(): return 'Z'
@dov
dov / svg-to-pdf-via-png
Created Jan 15, 2021
A script for converting a list of svg files to a pdf files via inkscape and png
View svg-to-pdf-via-png
#!/usr/bin/python
######################################################################
# A script for translating a list of svg (pages) to a pdf file
# via inkscape and cairo.
#
# The reason I used png steps as an intermediate is two fold:
#
# 1. It makes the pdf files less editable (which might be good
# when sending documents)