Skip to content

Instantly share code, notes, and snippets.

Frederik De Bleser fdb

Block or report user

Report or block fdb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View weird_shader.glsl
const int STEPS = 512;
const float EPSILON = 0.001;
const float MAX_DIST = 20.;
vec3 palette( in float t, in vec3 a, in vec3 b, in vec3 c, in vec3 d )
{
return a + b*cos( 6.28318*(c*t+d) );
}
float sdOctahedron( vec3 p, float s)
View the-force-fbm-test.frag
// Simple shader that I created for a shader workshop by Char Stiles
// https://codame.com/events/workshop-shaders
// Copy-paste this code in The Force:
// https://shawnlawson.github.io/The_Force/
// It needs music to shine! Works well with Azuki:
// https://soundcloud.com/azuki/sets/inverness
// (In The Force, click the microphone icon at the bottom, choose SoundCloud, paste the URL and press load.)
float circ(vec2 position){
@fdb
fdb / setup_nvidia_docker.sh
Last active Dec 3, 2019
Setup Tensorflow GPU using Docker on Ubuntu 18.04
View setup_nvidia_docker.sh
#!/bin/bash
# This script is used to setup a working Tensorflow GPU installation using Docker.
# It's only tested on Ubuntu 18.04.
# When all is done, run the following command to get a Bash shell with Tensorflow:
# docker run --gpus all -u $(id -u):$(id -g) -v $PWD:/root -it --rm tensorflow/tensorflow:latest-gpu-py3 bash
# Setup Docker
# Instructions from https://docs.docker.com/install/linux/docker-ce/ubuntu/
@fdb
fdb / pushing.js
Created Oct 11, 2018
Keep Pushing — Paper.js Sketch
View pushing.js
// Use in http://sketch.paperjs.org/
function rand(min, max) {
return min + Math.random() * (max - min);
}
var RADIUS = 400;
var circ = new Path.Circle({
position: view.center,
@fdb
fdb / count_words.py
Created Mar 7, 2018
Counting Words with Python 3
View count_words.py
import csv
import string
translator = str.maketrans('', '', string.punctuation)
word_count = {}
text = open('declaration.txt').read()
words = text.split()
for word in words:
@fdb
fdb / Cargo.toml
Last active Dec 5, 2017
Dynamically loading Windows function with GetProcAddress
View Cargo.toml
[package]
name = "procaddress"
version = "0.1.0"
authors = []
[dependencies]
libc = "0.2.33"
View Cargo.toml
[package]
name = "procaddress"
version = "0.1.0"
authors = []
[dependencies]
libc = "0.2.33"
@fdb
fdb / Cargo.toml
Last active Apr 27, 2020
Calling Rust from C++
View Cargo.toml
[package]
name = "vec"
version = "0.1.0"
authors = ["Frederik De Bleser <frederik@debleser.be>"]
[lib]
name = "vec"
crate-type = ["dylib"]
[dependencies]
@fdb
fdb / index.html
Last active Jan 30, 2017
Uploading to S3 from the browser
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="https://cdn.rawgit.com/Caligatio/jsSHA/v2.2.0/src/sha256.js"></script>
<title>S3 Post Upload Example</title>
<style>
body { font: 14px arial; padding: 20px; margin: 80px auto; width: 40rem; }
input { display: block; font: 16px arial; padding: 5px; margin: 5px; width: 40rem;}
</style>
@fdb
fdb / random-letter.py
Created Apr 14, 2016
NodeBox 1 random letter script
View random-letter.py
# NodeBox 1 script that generates a composition of random letters.
# Download NodeBox 1 at https://www.nodebox.net/download/
size(800, 400)
from random import choice, uniform, seed
seed(52)
colors = [[0, 0, 0], [1, 0, 0], [1, 1, 1]]
def comp(x, y, w, h):
push()
You can’t perform that action at this time.