Skip to content

Instantly share code, notes, and snippets.

@harvyso
harvyso / MathLibBenchmark.java
Created March 22, 2020 18:55 — forked from thomasjungblut/MathLibBenchmark.java
Math Library Benchmark: GPU vs. JBLAS vs. pure Java
package de.jungblut.benchmark;
import java.util.Random;
import com.google.caliper.Param;
import com.google.caliper.Runner;
import com.google.caliper.SimpleBenchmark;
import de.jungblut.math.DoubleMatrix;
import de.jungblut.math.cuda.JCUDAMatrixUtils;
import sys
from enum import *
import cozmo
from cozmo.util import degrees
from Triggers import *
# Log Error
def error(message):
print("*********************ERROR:", message)
@harvyso
harvyso / GLSL-Noise.md
Created May 13, 2019 18:27 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
'use strict';
const path = require('path');
const webpack = require('webpack');
module.exports = {
devtool: 'source-map',
context: path.resolve('src'),
entry: [
'webpack-dev-server/client?http://0.0.0.0:8080', // WebpackDevServer host and port

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@harvyso
harvyso / WebGL-frameworks-libraries.md
Created August 10, 2018 12:24 — forked from dmnsgn/WebGL-WebGPU-frameworks-libraries.md
A collection of WebGL frameworks and libraries

A non-exhaustive list of WebGL frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are outdated/not maintained anymore.

Engines and libraries

  • three.js: JavaScript 3D library
  • stack.gl: an open software ecosystem for WebGL, built on top of browserify and npm.
  • PixiJS: Super fast HTML 5 2D rendering engine that uses webGL with canvas fallback
  • Pex: Pex is a javascript 3d library / engine allowing for seamless development between Plask and WebGL in the browser.
  • Babylon.js: a complete JavaScript framework for building 3D games with HTML 5 and WebGL
  • AwayJS: AwayJS is a graphics library for javascript written in typescript
  • SceneJS: An extensible WebGL-based engine for high-detail 3D visualisation
@harvyso
harvyso / kafka-cheat-sheet.md
Created July 27, 2018 06:35 — forked from ursuad/kafka-cheat-sheet.md
Quick command reference for Apache Kafka

Kafka Topics

List existing topics

bin/kafka-topics.sh --zookeeper localhost:2181 --list

Describe a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic

Purge a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000

... wait a minute ...

@harvyso
harvyso / Graphql-go-benchmark_test.go
Created July 26, 2018 20:13
GraphQL github.com/graphql-go/handler vs REST net/http
package graphql
import (
"bytes"
"encoding/json"
"net/http"
"net/http/httptest"
"testing"
"github.com/graphql-go/graphql"
@harvyso
harvyso / AccessFileOnClasspath
Created July 14, 2018 12:55 — forked from mgbckr/AccessFileOnClasspath
Resource access in Maven projects.
/**
* <p>Shows how files in the class path can be accessed when using the standard
* Maven directory layout.</p>
*
* <p>The test file is "src/test/resources/accessFileOnClasspath/test.txt".
* It is accessed using either {@link ClassLoader#getResource(String)} or
* {@link ClassLoader#getResourceAsStream(String)}. Note that the file's
* path is always relative to the class path's root. Thus the test file is
* accessed using "accessFileOnClasspath/test.txt".</p>
*
@harvyso
harvyso / javascript-for-kids.md
Created June 18, 2018 18:04 — forked from a1ip/javascript-for-kids.md
🇷🇺 Решения упражнений из замечательной книги Ника Моргана «JavaScript для детей» https://git.io/js4ksol Если же вы просто хотите скачать файлы на компьютер, то вам сюда https://git.io/js4kidssolutionsru