Skip to content

Instantly share code, notes, and snippets.

View wcoastsands's full-sized avatar
😎
Godot? Don't mind if I g'do!

wcoastsands

😎
Godot? Don't mind if I g'do!
  • 09:58 (UTC -07:00)
View GitHub Profile
@fcoclavero
fcoclavero / instructions.md
Created December 28, 2020 21:55
Fix Razer device not detected on macOS Big Sur 11.1

@Jandalf I recently had to reset my System Integrity Protection settings (csrutil clear) and once again ran into this issue, where my Razer device was not recognized.

I have upgraded to macOS Big Sur 11.1, and I can confirm that the solutions by @avaddon and @rdabban, which had worked for me on 11.0, no longer work.

Manually loading the kernel extension (the kextload command) will display the error code 27 "Extension with identifiers com.razer.common.razerhid not approved to load. Please approve using System Preferences.", but no pop-up or "Allow" option would appear anywhere on the System Preferences.

Adding the Razer TeamID with the /usr/sbin/spctl kext-consent add R2H967U7J8 command showed me a pop-up, but with no "Allow" option, and no option to allow the kernel extension would appear in the System Preferences, so no good.

I finally managed to make it work by temporarily disabling System Integrity Protection (SIP), as follows:

@LotteMakesStuff
LotteMakesStuff / 1.md
Last active January 5, 2023 20:54
UPM: How to make a custom package

UPM: How to make a custom package So, Unity has this shiny new package manager, and you have code you want to share between projects - wouldn't it be great if we could bundle up our shared code and plug it into all the projects that need it? Let's figure out how to make our own Package!


Todo

  • Modify the project manifest
  • Make a package manifest
  • Package the manifest up with some test code
  • Try it out in Unity!

using System.Collections.Generic;
using UnityEditor;
using System.IO;
using UnityEngine;
using System;
// https://effectiveunity.com/articles/how-to-set-the-android-sdk-path-via-scripting-in-unity/
public class EditorSetup {
public static string AndroidSdkRoot {
get { return EditorPrefs.GetString("AndroidSdkRoot"); }
#if UNITY_EDITOR
using System.Reflection;
using UnityEngine;
using UnityEditor;
public class FontSwitcher : EditorWindow
{
[MenuItem("Font/Show Window")]
public static void ShowFontWindow()
{
@pyricau
pyricau / OomExceptionHandler.java
Created May 6, 2015 17:18
Dump the heap on OutOfMemoryError crashes in your debug builds.
import android.content.Context;
import android.os.Debug;
import java.io.File;
public class OomExceptionHandler implements Thread.UncaughtExceptionHandler {
private static final String FILENAME = "out-of-memory.hprof";
public static void install(Context context) {
Thread.UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler();
@paulocheque
paulocheque / .bash_profile
Last active September 30, 2023 17:26
.bash_profile example
# EDITOR=nano sudo visudo
# Change the following line: (:i to insert + esc to go back + :w to save + :q to quit)
# Defaults env_reset
# to:
# Defaults env_reset,timestamp_timeout=960 # in minutes
export PATH=$PATH:.
# export PATH=$PATH:/usr/bin