Skip to content

Instantly share code, notes, and snippets.

View fthues's full-sized avatar

Franz Thüs fthues

View GitHub Profile
@cfxd
cfxd / httpdfwd.plist
Created November 28, 2021 02:57
httpdfwd.plist for M1 MacBook Pro LEMP stack
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>httpdfwd</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active May 1, 2024 18:18
A collection of WebGL and WebGPU frameworks and libraries

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

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@yefim
yefim / Dockerrun.aws.json
Last active April 7, 2023 16:11
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "443"
}
@jeebak
jeebak / Vagrantfile
Last active January 23, 2020 22:34 — forked from anthonysterling/Vagrantfile
A vagrant replacement for ievms (for Linux, and macOS hosts)
# Usage: vagrant up windowsVersion-IEversion
#
# Eg. vagrant up win10-edge
#
# Based off of: # https://gist.github.com/anthonysterling/7cb85670b36821122a4a
boxes = {
# http://www.vagrantbox.es/
"xp-6" => "http://aka.ms/ie6.xp.vagrant",
"xp-8" => "http://aka.ms/ie8.xp.vagrant",
"vista-7" => "http://aka.ms/ie7.vista.vagrant",
@Vestride
Vestride / encoding-video.md
Last active April 24, 2024 09:59
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@averyvery
averyvery / spread.sass
Last active May 16, 2020 22:07
spread.sass
// strip-units required by spread mixin
// http://stackoverflow.com/questions/12328259/how-do-you-strip-the-unit-from-any-number-in-sass
@function strip-units($number)
@return $number / ($number * 0 + 1)
// pow and sqrt required by ease function
// adapted from https://github.com/at-import/Sassy-math/blob/master/sass/math.scss
@function pow($base, $exponent)
$value: $base
@PatrickJS
PatrickJS / factory-shared.es5.js
Last active January 6, 2024 04:18
Different examples of OOP "class" with "inheritance" done using JavaScript including languages that transpile into js. Take notice to the amount of boilerplate that's needed in ES5 compared to ES6. These examples all have the same interface with pros/cons for each pattern. If they seem similar that's whole point especially the difference between…
var EventEmitter = require('events').EventEmitter;
var _ = require('lodash');
// Factory shared
var makePerson = function() {
var person = {};
EventEmitter.call(person);
person.wallet = 0;
_.extend(person, personMethods)
return person;
@danharper
danharper / 1.Bus.js
Last active May 17, 2022 15:20
JavaScript Command Bus
const handlers = Symbol('handlers');
// adapts a handler class to a common interface
// (technically this one isn't required - the handler class already implements the same interface)
class ClassDispatchable {
constructor(theClass) {
this.theClass = theClass;
}
handle(command) {
return (new this.theClass).handle(command);
@dirkmc
dirkmc / interceptor.js
Last active January 20, 2016 17:01
Intercept requests from Amazon ELB and proxy them to a back end service depending on the IP indicated by the PROXY protocol
// Config looks like this:
/*
proxy: {
port: 5000,
// Indicates if there is a PROXY protocol enabled Load Balancer
// between us and the client
useProxyProtocol: true,
status: {
path: '/status.json',
// How many times can a host fail to respond before it is
@obolton
obolton / elb-nodejs-ws.md
Last active November 12, 2023 11:49
Configuring an AWS Elastic Load Balancer for a Node.js application using WebSockets on EC2

AWS ELB with Node.js and WebSockets

This assumes that:

  • You are using Nginx.
  • You want to accept incoming connections on port 80.
  • Your Node.js app is listening on port 3000.
  • You want to be able to connect to your Node.js instance directly as well as via the load balancer.

####1. Create load balancer