Skip to content

Instantly share code, notes, and snippets.

SonicZentropy /
Created Aug 21, 2020 — forked from clubapplets-server/
Script to backup VirtualBox's VMs on Google drive
# -*- coding: utf8 -*-
# !/usr/bin/env python3
ApplETS VM Backup script automatically creates a backup of all VirtualBox
virtual machines, stores the backups in Google drive and
deletes too old backups in Google drive. Crontab it if you
want to make it every a definite period of time.
Copyright 2015 ApplETS
View flags.cs
#pragma warning disable 0414, 0219, 649, 169, 1570
using System;
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
public enum Tags : long
None = 0,
Player = 1 << 0,

It seems to work by adding in this file /usr/lib/systemd/system/vmtoolsd.service

After=display-manager.service At the end of the [Unit] part.

SonicZentropy / ContentReplace.js
Last active Jun 3, 2019
Blackboard JS Hack to force rewrite copied URLs that link to shell-specific locations
View ContentReplace.js
<!-- This snippet binds a function to the "dom:loaded" event.
You can put your own javascript into the function, or replace
the entire snippet. -->
<script type="text/javascript">
Event.observe(document,"dom:loaded", function() {
//Just filter by span since BB uses random hashes for class names
let elements = document.getElementsByTagName('span');
let matching = "None";
for (let i = 0; i < elements.length; i++) {
SonicZentropy / .gitattributes
Created Apr 12, 2019
Master gitattributes for unity/ue4
View .gitattributes
*.uasset filter=lfs diff=lfs merge=lfs -text
*.umap filter=lfs diff=lfs merge=lfs -text
*.upk filter=lfs diff=lfs merge=lfs -text
*.udk filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.cginc text
*.shader text
View gist:b112711d79ffa6311a0ed2c5488c2669
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
ls = log --oneline
amend = commit -a --amend -C HEAD
new = !sh -c 'git log $1@{1}..$1@{0} "$@"'
ci = commit
co = checkout
cm = !git add . && git commit -a -m '$1' && git push && :
SonicZentropy /
Created Aug 21, 2018 — forked from sadikaya/
Cmder inside Webstorm terminal
  1. Set an environment variable called CMDER_ROOT to your root Cmder folder (in my case C:\Program Files (x86)\Cmder). It seems to be important that this does not have quotes around it because they mess with concatenation in the init script.
  2. In your IntelliJ terminal settings, use "cmd" /k ""%CMDER_ROOT%\vendor\init.bat"" as the Shell path. The double-double-quotes are intentional, as they counteract the missing double quotes in the environment variable.
View gist:f3711d2fa9b547a05cd2496077fda42d
public static void AO()
public static void ActivateCameraSplineFollow(float followTime)
public static void AddCameraSplinePoint(float x, float y, float z, float zoom)
public static void AddCameraSplinePointAtMouse()
public static void AddExperienceToActiveCrew(int xp)
public static void AdvanceDay()
public static void Aggression(Guid character, AutoAttackType aggression)
public static void AntiStagingWorldMap()
public static void ApplyProgressionTable(Guid character, Guid tableId)
public static void AttributeScore(Guid character, AttributeType attribute, int score)
SonicZentropy / FPSCounter.cs
Created Nov 28, 2017
Non-Shitty Unity FPS Counter
View FPSCounter.cs
namespace Zen.Common.Debug
#region Dependencies
using UnityEngine;
public class FpsCounter : MonoBehaviour
View Non-BoxingEnumDictExample.cs
private Dictionary<ComponentTypesEnum, List<ComponentEcs>> _componentPools =
new Dictionary<ComponentTypes, List<ComponentEcs>>(new FastEnumIntEqualityComparer<ComponentTypes>()); // This is the custom comparator passed into the dict constructor
struct FastEnumIntEqualityComparer<TEnum> : IEqualityComparer<TEnum>
where TEnum : struct
static class BoxAvoidance
static readonly Func<TEnum, int> _wrapper;