Skip to content

Instantly share code, notes, and snippets.

View guidoschmidt's full-sized avatar

Guido Schmidt guidoschmidt

View GitHub Profile
@guidoschmidt
guidoschmidt / hic_et_nunc_basic_scraper.py
Created March 11, 2021 12:21 — forked from schwittlick/hic_et_nunc_basic_scraper.py
This is a very basic no-frills scraper to retrieve the metadata and digital assets from all tokens minted on hicetnunc.xyz. I share this as a starting point for people who want to experiment with building alternative views on the works created on the platform or preserve the data. Feel free to improve upon this or add additional features.
import requests
import os
import ipfsapi
import concurrent.futures
api = ipfsapi.Client(host='https://ipfs.infura.io', port=5001)
url = "https://better-call.dev/v1/contract/mainnet/KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton/tokens"
r = requests.get(url)
@guidoschmidt
guidoschmidt / EnvironmentSphere.js
Created February 16, 2021 08:53
three.js fake env map
import * as THREE from "three";
// Local imports
import levelLogic from "@common.js/logic/logic.level.js";
import webGLLogic from "@common.js/logic/logic.webgl.js";
import assetLogic from "@common.js/logic/logic.assets.js";
class EnvironmentSphere {
constructor(filepath, radius = 60) {
console.assert(
@guidoschmidt
guidoschmidt / gs.sh
Created December 11, 2020 10:54 — forked from esrever10/gs.sh
gstreamer send and receive h264 rtp stream
# linux send h264 rtp stream:
gst-launch-1.0 -v ximagesrc ! video/x-raw,framerate=20/1 ! videoscale ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=superfast ! rtph264pay ! udpsink host=127.0.0.1 port=5000
# Macos send h264 rtp stream:
gst-launch-1.0 -v avfvideosrc capture-screen=true ! video/x-raw,framerate=20/1 ! videoscale ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=superfast ! rtph264pay ! udpsink host=127.0.0.1 port=5000
# receive h264 rtp stream:
gst-launch-1.0 -v udpsrc port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! decodebin ! videoconvert ! autovideosink
@guidoschmidt
guidoschmidt / Matrix.hlsl
Created November 25, 2020 22:10 — forked from mattatz/Matrix.hlsl
Matrix operations for HLSL
#ifndef __MATRIX_INCLUDED__
#define __MATRIX_INCLUDED__
#define IDENTITY_MATRIX float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
float4x4 inverse(float4x4 m) {
float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0];
float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1];
float n31 = m[0][2], n32 = m[1][2], n33 = m[2][2], n34 = m[3][2];
float n41 = m[0][3], n42 = m[1][3], n43 = m[2][3], n44 = m[3][3];
@guidoschmidt
guidoschmidt / gltf_export_nodes.py
Created November 25, 2020 14:36
GLTF Blende export nodes
import bpy
# User variables
UV_MAP_NAME = "BAKETOOL_Job 1"
IMAGE_NAME = "Default_albedo.jpg"
# Gloabls
gltf_settings_node = bpy.data.node_groups['glTF Settings']
y = 2000
@guidoschmidt
guidoschmidt / GitCommitAndSave.cs
Last active October 12, 2020 18:16
Unity create Preset + git autocommit
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Diagnostics;
using NaughtyAttributes;
using UnityEngine;
using UnityEditor;
using UnityEditor.Presets;
@guidoschmidt
guidoschmidt / gstreamer.md
Created May 20, 2020 14:22 — forked from nebgnahz/gstreamer.md
Collections of GStreamer usages

Most GStreamer examples found online are either for Linux or for gstreamer 0.10.

This particular release note seems to have covered important changes, such as:

  • ffmpegcolorspace => videoconvert
  • ffmpeg => libav

Applying -v will print out useful information. And most importantly the negotiation results.

@guidoschmidt
guidoschmidt / UniversalPipelineTemplateShader.shader
Created May 15, 2020 08:13 — forked from phi-lira/UniversalPipelineTemplateShader.shader
Template shader to use as guide to create Universal Pipeline ready shaders. This shader works with Universal Render Pipeline 7.1.x and above.
// When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME!
// However, if you want to author shaders in shading language you can use this teamplate as a base.
// Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader.
// This shader works with URP 7.1.x and above
Shader "Universal Render Pipeline/Custom/Physically Based Example"
{
Properties
{
// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
@guidoschmidt
guidoschmidt / rotationmatrix.glsl
Created March 23, 2020 11:03
GLSL: Rotation Matrix
mat4 rotationMatrix(vec3 axis, float angle)
{
axis = normalize(axis);
float s = sin(angle);
float c = cos(angle);
float oc = 1.0 - c;
return mat4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0,
oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0,
oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0,
0.0, 0.0, 0.0, 1.0);
@guidoschmidt
guidoschmidt / install.sh
Last active August 17, 2019 21:07 — forked from Danw33/install.sh
macOS Homebrew Install FFMPEG --with all options
2019
brew install nasm pkg-config texi2html aom fontconfig freetype frei0r gnutls lame libass libbluray libsoxr libvorbis libvpx opencore-amr openjpeg opus rtmpdump rubberband sdl2 snappy speex tesseract theora x264 x265 xvid xz
brew install ffmpeg