Skip to content

Instantly share code, notes, and snippets.

View lordlycastle's full-sized avatar
🤙
Let it Fly!

lordlycastle

🤙
Let it Fly!
View GitHub Profile

Downgrade any Homebrew package easily

Posted on March 21, 2019 by Dae

I'll use Tesseract as an example, but the same logic can be applied to any other Homebrew package.

Backstory: I ran brew upgrade which upgraded Tesseract on my computer from version 3.05 to version 4.0.0. The new version didn't work the way I wanted, so I decided to downgrade it. It turned out pretty easy.

Once again: in the commands listed below replace tesseract with the name of the package that you want to downgrade.

@lordlycastle
lordlycastle / osx_setup.sh
Created June 23, 2020 10:36 — forked from dannysmith/osx_setup.sh
Sensible defaults for New Mac
#!/usr/bin/env bash
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@lordlycastle
lordlycastle / My Google Calendar App Script.js
Last active June 22, 2020 10:03
Google App Script that manipulates some events on user's G Calendar.
/*
01010111 01100001 01110100 01100101 01110010
01111001 01101111 01101111
01100100 01101111 01101001 01101110 00100111
01101000 01100101 01111001 01100001 00111111
00100001
*/
/*
Settings
@lordlycastle
lordlycastle / OdinWatchWindow.cs
Created June 18, 2020 20:05 — forked from Froghut/OdinWatchWindow.cs
Odin Watch Window
#if ODIN_INSPECTOR
using System;
using System.Collections.Generic;
using System.Linq;
using Sirenix.OdinInspector.Editor;
using Sirenix.Utilities;
using Sirenix.Utilities.Editor;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
@lordlycastle
lordlycastle / CameraRotate.cs
Created June 13, 2020 01:20
Simple orbital camera from way back... 👴
using UnityEngine;
using System.Collections;
public class CameraRotate : MonoBehaviour
{
public Transform targetObject;
public Vector3 targetOffset;
public float averageDistance = 5.0f;
public float maxDistance = 20;
public float minDistance = .6f;
@lordlycastle
lordlycastle / FreeFlyCamera.cs
Created June 12, 2020 19:46
Fly in the world with simple PC controls. Can't get simpler than this.
using UnityEngine;
namespace WFShaderDemo {
public class FreeFlyCamera : MonoBehaviour {
public bool lockCursor = false;
public float cameraSensitivity = 4;
public float normalMoveSpeed = 10;
public float smoothTime = 10f;
public Camera cam;
@lordlycastle
lordlycastle / MaterialsFloatTweener.cs
Created June 12, 2020 19:36
Tween any float material property with help of DOTween! 🌀
using System;
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using Sirenix.OdinInspector;
using UnityEngine;
public class MaterialsFloatTweener : MonoBehaviour
{
[InlineEditor()]
@lordlycastle
lordlycastle / SceneManager.cs
Last active June 12, 2020 20:13
A semi-decent scene manager for VR setup. Where you keep SDK in a separate scene and load content scenes as additives scenes.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneManager : MonoBehaviour
{
@lordlycastle
lordlycastle / MoveItemToView.cs
Created June 12, 2020 19:34
Add moving stuff as child with Z offset which will be distance from headset. Use this to rotate the root gameobject.
using DG.Tweening;
using Sirenix.OdinInspector;
using UnityEngine;
public class MoveItemToView : MonoBehaviour
{
[Header("Found dynamically.")]
public Transform headsetTransform;