Skip to content

Instantly share code, notes, and snippets.

@0xdeadbad
0xdeadbad / 00-unity-sandbox-error-ubuntu24.04.md
Last active December 18, 2024 13:27
How to fix "No usable sandbox! Update your kernel... If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox." Unity error on Ubuntu 24.04

New apparmor strict policies

The recent LTS release of Ubuntu introduced some more strict apparmor policies that are affecting many packages. To fix it is quite simple, add a file so apparmor don't deny Unityhub actions.

You can do it by yourself or use the script utility I wrote. For the script checkout Using the script

Commands to fix it manually

If you installed using the .deb distribution, your Unity Hub binary file is probably at /opt/unityhub/unityhub-bin, so you can just copy-paste the snippet to /etc/apparmor.d/unityhub

@cyberwani
cyberwani / wordpress-upload-base64.php
Created September 13, 2019 10:19
Upload a base64 string as image to the WordPress media library
<?php
/**
* Save the image on the server.
*/
function save_image( $base64_img, $title ) {
// Upload dir.
$upload_dir = wp_upload_dir();
$upload_path = str_replace( '/', DIRECTORY_SEPARATOR, $upload_dir['path'] ) . DIRECTORY_SEPARATOR;
@troyharvey
troyharvey / deployment.yml
Last active April 8, 2025 21:11
Using Kubernetes envFrom for environment variables
# Use envFrom to load Secrets and ConfigMaps into environment variables
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: mans-not-hot
labels:
app: mans-not-hot
spec:
replicas: 1
@gunderson
gunderson / FlyCamera.cs
Last active February 10, 2025 17:51
Unity Script to give camera WASD + mouse control
using UnityEngine;
using System.Collections;
public class FlyCamera : MonoBehaviour {
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
Simple flycam I made, since I couldn't find any others made public.
Made simple to use (drag and drop, done) for regular keyboard layout