Skip to content

Instantly share code, notes, and snippets.

View embiem's full-sized avatar

Martin Beierling-Mutz embiem

View GitHub Profile
@embiem
embiem / ml-intro-ml-in-gamedev-workshop.ipynb
Last active October 22, 2019 14:58
ML Intro & ML in GameDev Workshop.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am embiem on github.
  • I am mbeierling (https://keybase.io/mbeierling) on keybase.
  • I have a public key ASDa9PSKmSTOIZzmhEuvoxEDmsFWWOSGXC3PkpQcPls6pQo

To claim this, I am signing this object:

@embiem
embiem / .vscodestyles.css
Last active January 19, 2018 14:43
vscode custom css
.monaco-shell {
font-family: "Operator Mono", "Inconsolata", monospace;
}
/*
Fat Cursor.
This overwrites the "underline thin" style since that is one that can be styled with CSS
So set your settings to:
"editor.cursorStyle": "underline-thin",
*/
@embiem
embiem / screenshot.js
Last active September 19, 2017 08:58
Create a full-height screenshot of a website using [puppeteer](https://github.com/GoogleChrome/puppeteer)
const puppeteer = require('puppeteer');
const width = 1200;
const url = process.argv.length > 2 ? process.argv[2] : 'https://ea.com';
const screenshotPath = process.argv.length > 3 ? process.argv[3] : 'screenshot.png';
console.log(`${url} --> ${screenshotPath}`);
(async () => {
const browser = await puppeteer.launch();
try {
@embiem
embiem / generate_local_ssl.bat
Created September 14, 2017 19:50
modified OpenSSL config & batch file to generate self-signed certificate for Twitch extension development
openssl req -newkey rsa:4096 -days 1001 -nodes -x509 -subj "/C=US/ST=California/L=San Francisco/O=Twitch/OU=web/CN=localhost" -extensions SAN -config ".\openssl.cnf" -keyout "testing.key" -out "testing.crt"
@embiem
embiem / Lane.cpp
Last active August 26, 2020 02:53
Equally distributed Spline Mesh in UE4
// Used further down in the OnConstruction call to set values on one spline mesh
void ALane::BuildTrackElement(int32 atDistance, USplineMeshComponent* SplineMesh, UStaticMesh* LaneElementMesh, ESplineMeshAxis::Type LaneElementMeshForwardAxis)
{
FVector currLocation, currTangent, nextLocation, nextTangent;
currLocation = SplineComponent->GetLocationAtDistanceAlongSpline(atDistance, ESplineCoordinateSpace::Type::Local);
currTangent = SplineComponent->GetTangentAtDistanceAlongSpline(atDistance, ESplineCoordinateSpace::Type::Local);
nextLocation = SplineComponent->GetLocationAtDistanceAlongSpline(atDistance + MeshSpacing, ESplineCoordinateSpace::Type::Local);
nextTangent = SplineComponent->GetTangentAtDistanceAlongSpline(atDistance + MeshSpacing, ESplineCoordinateSpace::Type::Local);
@embiem
embiem / DynamicScale.cs
Created July 5, 2017 11:39
Stretch object based on its speed and movement direction (original by @_pikopik https://twitter.com/_pikopik/status/882346033656844288) #Unity
using UnityEngine;
[ExecuteInEditMode]
public class DynamicScale : MonoBehaviour
{
Vector3 lastPosition;
void Start()
{
lastPosition = transform.position;
@embiem
embiem / codelabs_spider.py
Last active August 27, 2020 09:33
Scrapy Spider that scrapes Google's Codelabs for Category, Description, Link, Last Updated, Duration and Tags.
import scrapy
class CodelabsSpider(scrapy.Spider):
name = "codelabs"
def start_requests(self):
urls = [
'https://codelabs.developers.google.com/'
]
for url in urls:
@embiem
embiem / AdobeButton.js
Created June 23, 2017 08:06
Adobe App-styled button as a React Component
import React, { Component } from 'react';
import './AdobeButton.css';
/**
* Adobe-Style button
*/
class AdobeButton extends Component {
render() {
const { text, onClick } = this.props;
@embiem
embiem / Logger.js
Created May 5, 2017 12:14
Custom logging via ES6 class. Extendable.
class Logger {
constructor() {
if (!Logger.instance) {
Logger.instance = this;
}
return Logger.instance;
}
log(...args) {
console.log(...args);