Launch amazin-linux ec2 server and create a security group on same VPC as your elasticache cluster. Expost port 22 / shh inbound. Assuming you have your AWS credentials prepped, run the following to create a tunnel to your redis server on port 9999 of your local machine: ssh -i ~/.ssh/{creds}.pem -L 9999:{remote-redis-host}:{remote-redis-port} [email protected]{ec2-public-dns-name} You can […]
Category Archives: code
Very simple remote logging.
I thought up a very simple way to get Nginx to handle remote event logging over http using Nginx’s custom log formats. You can format the logs as CSV and use them elsewhere. Insert the following within http block (outside the server block): Add a location into the server block to handle the custom logging: […]
Useful Docker commands and tips
https://gist.github.com/jamiemarkwhite/b65c49455d2ec47a3c8466c8bc8356ab
Firefox Chromeless Fullscreen
This is a solution to get Firefox (Quantum) working chromeless in fullscreen from startup. This would be useful for setting up a browser for a kiosk. Create a userChrome.css file: https://www.howtogeek.com/334716/how-to-customize-firefoxs-user-interface-with-userchrome.css/ Paste this in to the css file: Useful to have installed for any other tweaks to the browser style… https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox Add this extension to […]
Multi-touch on MacOS in the Browser
I am faced, yet again, with making multi-touch work in the browser on MacOS. This has always been a tricky one to solve. There have been working solutions in the past but the ones I can find are broken in one way or another and have become dusty and forgotten. Probably because most people decide […]
Smooth Shading in Blender / GLTF / THREE.JS MeshPhysicalMaterial
This is how you get smooth shading on your meshes from Blender -> GLTF -> THREE (with a MeshPhysicalMaterial) 1. Export your mesh with smooth shading toggled on in the object’s Tools -> Edit menu. 2. Make sure material.flatShading=false is set on your material. 3. If you still have problems, see this https://github.com/mrdoob/three.js/issues/347
2D Motion Tracking in Javascript & HTML
Precomputed 2D motion tracking on HD video applied to DOM element with CSS transformations.
Fix timezone settings for PHP on Mac OSX El Capitan for Symfony
Symfony requires you to specify a date.timezone in the ini file. The problem is, Mac uses it’s own install of PHP, and you need to create directory structure it searches for the ini file… and a php.ini file. Here’s how you do it. 1. Open terminal 2. nano /Library/Server/Web/Config/php/php.ini 3. add line date.timezone = “Europe/London” […]
Launch Chrome in Kiosk Mode with URL (Tested on Mac / Chrome 43.0.2357.124)
GLSL 1.2 – Memory Error when using Attributes (Solution)
MAKE SURE YOU ARE ACTIVELY USING AND REFERENCING THE ATTRIBUTES IN THE SHADER!
Hundreds of Thousands of Particles at 60 fps
Recently been getting to grips with Cinder, OpenGL and GLSL for a project. I managed to get close to a million particles drawing at around 60fps Here’s what I did to achieve this: Firstly I created a VBO mesh that contained randomly positioned vertices (each vertex represented a root particle position). Using VBO meshes mean […]