Skip to content

Instantly share code, notes, and snippets.

View SonicZentropy's full-sized avatar

Casey Bailey SonicZentropy

View GitHub Profile
@SonicZentropy
SonicZentropy / ContentReplace.js
Last active June 3, 2019 16:40
Blackboard JS Hack to force rewrite copied URLs that link to shell-specific locations
<!-- 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
SonicZentropy / manjarovmtools.md
Created April 7, 2020 20:45
Manjaro VMTools fix

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.

#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,
@SonicZentropy
SonicZentropy / automatic_backup.py
Created August 21, 2020 04:19 — forked from clubapplets-server/automatic_backup.py
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 applets@ens.etsmtl.ca
@SonicZentropy
SonicZentropy / build.rs
Last active August 19, 2021 02:23
Rust build.rs file for auto copying game dev assets to target build dir
use std::{env, fs, path::{Path, PathBuf}};
fn get_output_path() -> PathBuf {
let manifest_dir_string = env::var("CARGO_MANIFEST_DIR").unwrap();
let build_type = env::var("PROFILE").unwrap();
let path = Path::new(&manifest_dir_string)
.join("target")
.join(build_type);
return PathBuf::from(path);
}
@SonicZentropy
SonicZentropy / tsconfig.json
Created September 18, 2022 00:33
Mega-tsconfig with every possible option commented
{
"compilerOptions": {
/* Basic Options */
"target": "es2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "ESNext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */
"allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
"declaration": true, /* Generates corresponding '.d.ts' file. */