Skip to content

Instantly share code, notes, and snippets.

Eric Eastwood MadLittleMods

Block or report user

Report or block MadLittleMods

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 Unity-GUIStyles-list.md

How to Use?

GUIStyle mystyle = new GUIStyle("some string from the list below");


UnityEditor.ConsoleWindow.Constants

  • "CN Box"
  • "Button"
View lxss-wsl-bash-windows-tips.md

Just some notes and references for myself.

  • In bash, you can access your C:\ drive via /mnt/c/
  • ~ = C:\Users\MLM\AppData\Local\lxss\home\mlm and is different from your Windows user directory C:\Users\MLM

How to google things

View fusion-360-notes.md

Autodesk Fusion 360

Autodesk Fusion 360 is free for personal use. It is a CAD program like Autodesk Inventor(which can be free if you have a .edu student school email address). I was familiar with Inventor and found Fusion 360 pretty similar with nice parametric modeling.

  • You can have multiple components in one design (and apply some assembly contraints)
  • For the blueprint type view that you can annotate and add dimensions, it is called a "drawing"

Random guides

@MadLittleMods
MadLittleMods / Pendulum.cs
Last active Sep 23, 2019
A Unity script to Simulate Pendulum Motion
View Pendulum.cs
using UnityEngine;
using System.Collections;
// Author: Eric Eastwood (ericeastwood.com)
//
// Description:
// Written for this gd.se question: http://gamedev.stackexchange.com/a/75748/16587
// Simulates/Emulates pendulum motion in code
// Works in any 3D direction and with any force/direciton of gravity
//
View cmder-restart-ssh-agent.md

Sometimes the Cmder SSH agent seems to be borked and anything you try to connect to just rejects. I often run into this when running an Ansible command on a remote host

ssh root@xx.xxx.xxx.xxx
root@xx.xxx.xxx.xxx: Permission denied (publickey).
ssh_exchange_identification: Connection closed by remote host

Fix

@MadLittleMods
MadLittleMods / manually-add-saved-password-to-chrome.md
Last active Mar 23, 2019
Manually add saved password to Chrome
View manually-add-saved-password-to-chrome.md

Manually add saved password to Chrome

Some apps don't have browser logins (mobile or desktop only apps) but you still want to manage your passwords in one place (Google Chrome).

Solution

Inspect the page and insert the following HTML <form> anywhere on the page. Then fill it out and submit 🤠

@MadLittleMods
MadLittleMods / renderer.js
Last active Feb 19, 2019
A RequireJS renderer module for adding UI modules/templates to the document
View renderer.js
/*
* Available functions:
* renderer.replace(...options...)
* renderer.append(...options...)
* renderer.prepend(...options...)
* renderer.before(...options...)
* renderer.after(...options...)
*
* Options:
* module: The RequireJS module to render.
@MadLittleMods
MadLittleMods / webpack-ContextReplacementPlugin--contextModuleFactory-npe.md
Created Feb 1, 2019
webpack ContextReplacementPlugin -> Cannot read property 'contextModuleFactory' of undefined
View webpack-ContextReplacementPlugin--contextModuleFactory-npe.md

Thanks to https://tgarchive.ru/group/webpack_ru/2018-03-21/

I solved this by making sure only webpack v4 was in my dependencies (check package-lock.json). Before I had mixed webpack v1 and v4 and had this error when I was upgrading webpack, https://gitlab.com/gitlab-org/gitter/webapp/issues/2078

TypeError: Cannot read property 'contextModuleFactory' of undefined
    at ContextReplacementPlugin.apply (webapp\node_modules\webpack\lib\ContextReplacementPlugin.js:59:18)
    at Compiler.apply (webapp\node_modules\webpack-stream\node_modules\tapable\lib\Tapable.js:164:16)
    at WebpackOptionsApply.process (webapp\node_modules\webpack-stream\node_modules\webpack\lib\WebpackOptionsApply.js:62:18)
    at webpack (webapp\node_modules\webpack-stream\node_modules\webpack\lib\webpack.js:22:48)
You can’t perform that action at this time.