Skip to content

Instantly share code, notes, and snippets.

View webthingee's full-sized avatar

Sean Lange webthingee

View GitHub Profile
@webthingee
webthingee / dark.md
Created January 15, 2019 23:31 — forked from a7madgamal/dark.md
Dark mode for Slack on MacOS
  1. Close slack
  2. Open this file /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js
  3. Append this to it
document.addEventListener('DOMContentLoaded', function() {
 $.ajax({
   url: 'https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css',
   success: function(css) {
 $("").appendTo('head').html(css);
@webthingee
webthingee / normalize-slope.cs
Created August 16, 2018 18:31 — forked from ashblue/normalize-slope.cs
Unity 2D slope normalizer for walking up and downhill with corner snapping. Based upon https://www.youtube.com/watch?v=xMhgxUFKakQ
// @NOTE Must be called from FixedUpdate() to work properly
void NormalizeSlope () {
// Attempt vertical normalization
if (grounded) {
RaycastHit2D hit = Physics2D.Raycast(transform.position, -Vector2.up, 1f, whatIsGround);
if (hit.collider != null && Mathf.Abs(hit.normal.x) > 0.1f) {
Rigidbody2D body = GetComponent<Rigidbody2D>();
// Apply the opposite force against the slope force
// You will need to provide your own slopeFriction to stabalize movement
@webthingee
webthingee / Arrows2DMovement.cs
Created January 5, 2018 23:12 — forked from dvddarias/Arrows2DMovement.cs
Unity editor script to precisely move, rotate and scale GameObjects on a 2D scene, using the arrow keys.
/*
Unity editor script to precisely move, rotate and scale GameObjects on 2D scenes, using the arrow keys.
Notes:
- To use it just include it on an "Assets/Editor" folder on your project.
- The action depends on the selected tool and the size of the movement depends on the Scene view zoom.
- The more "zoomed in" is the scene view the smaller is the movement step.
- It will work when the current Scene tab is in 2D mode and there is at least one gameObject selected,
otherwise the scene camera will move as usual :)