Skip to content

Instantly share code, notes, and snippets.

View einsteinx2's full-sized avatar

Ben Baron einsteinx2

View GitHub Profile
Hey that's great! Here's a super quick overview to get you started, but if you have some time later, I can give you a more in depth walkthrough over a google hangout.
While it's coded in C#, we're targeting the Mono 3 runtime, not necessarily .NET. For all intents and purposes, these are the same, but we do occasionally use some Mono additions (like dllmaps for different platforms).
Basically the project it split into 2 assemblies: Core and Server.
Core contains the data model and basically any logic that isn't specific to the actual server part (i.e. could also be used in a client).
This is:
@einsteinx2
einsteinx2 / locking.swift
Last active March 2, 2019 17:25 — forked from kristopherjohnson/locking.swift
Simple synchronization functions for Swift, wrapping the Cocoa NSLocking classes
import Foundation
/// Protocol for NSLocking objects that also provide try()
public protocol TryLockable: NSLocking {
func `try`() -> Bool
}
// These Cocoa classes have tryLock()
extension NSLock: TryLockable {}
extension NSRecursiveLock: TryLockable {}

Keybase proof

I hereby claim:

  • I am einsteinx2 on github.
  • I am benbaron (https://keybase.io/benbaron) on keybase.
  • I have a public key ASCi0o7AxR8SyDgF0HSFUsGCPogrkc082VNZ2U_iufyegQo

To claim this, I am signing this object:

iSub 4 Missing Functionality:
Play Queue:
- Drag and drop various minor issues
- UX improvement, when mini player in play queue is not at the top, fade in a copy. When scrolling back go the top, make it slightly sticky so if falls back into place easily.
Playback:
DONE - Videos (Video player and play queue incrementing)
DONE - Support self signed SSL in AVPlayer/AVPlayerController
- Shuffle mode
@einsteinx2
einsteinx2 / BalanceCLA.txt
Created October 23, 2017 16:03
Balance Contributor License Agreement
Contributor License Agreement
By contributing your code to Balance you grant Balanced Software, Inc. a non-exclusive, irrevocable, worldwide, royalty-free, sublicenseable, transferable license under all of Your relevant intellectual property rights (including copyright, patent, and any other rights), to use, copy, prepare derivative works of, distribute and publicly perform and display the Contributions on any licensing terms, including without limitation: (a) open source licenses like the GPL license; and (b) binary, proprietary, or commercial licenses. Except for the licenses granted herein, You reserve all right, title, and interest in and to the Contribution.
You confirm that you are able to grant us these rights. You represent that You are legally entitled to grant the above license. If Your employer has rights to intellectual property that You create, You represent that You have received permission to make the Contributions on behalf of that employer, or that Your employer has waived such rights for t
@einsteinx2
einsteinx2 / iSubCLA.txt
Created November 16, 2017 23:25
iSub CLA
Contributor License Agreement
By contributing your code to iSub you grant Benjamin Baron a non-exclusive, irrevocable, worldwide, royalty-free, sublicenseable, transferable license under all of Your relevant intellectual property rights (including copyright, patent, and any other rights), to use, copy, prepare derivative works of, distribute and publicly perform and display the Contributions on any licensing terms, including without limitation: (a) open source licenses like the GPL license; and (b) binary, proprietary, or commercial licenses. Except for the licenses granted herein, You reserve all right, title, and interest in and to the Contribution.
You confirm that you are able to grant us these rights. You represent that You are legally entitled to grant the above license. If Your employer has rights to intellectual property that You create, You represent that You have received permission to make the Contributions on behalf of that employer, or that Your employer has waived such rights for the Contribut
@einsteinx2
einsteinx2 / monitorio - Bash function to monitor the size of a file on disk
Last active April 16, 2023 11:07
monitorio - Bash function to monitor the size of a file on disk
# Show write speed for file or directory
# Optional second parameter to set the check interval in seconds, defaults to 20
monitorio () {
target="$1"
interval=${2:-"20"}
echo -e "Checking every ${interval} seconds"
size=$(du -ks "$target" | awk '{print $1}')
firstrun="1"
echo ""
while [ 1 ]; do
@einsteinx2
einsteinx2 / hangfix-intel-e1000e
Last active February 13, 2020 20:26
ProxMox if-up.d script to fix hanging Intel e1000e Gigabit NIC when a VM has a lot of network usage
#!/bin/sh -e
# Instructions:
# Change HANGING_IFACE to match the interface name of your interface (this can
# be found by running `ifconfig -a` or `cat /etc/network/interfaces`.
#
# Place this file in `/etc/network/if-up.d` and make sure to make it executable
# by running `chmod a+x /etc/network/if-up.d/hangfix-intel-e1000e` then reboot.
#
# After reboot, confirm it worked by running `ethtool -k eno1 | grep segmentation`
@einsteinx2
einsteinx2 / organize_nkit_gc_for_wii.py
Last active June 26, 2023 19:39
Small python script to convert a folder full of *.nkit.iso files into the folder structure needed for use on a modded Wii
#!/usr/bin/env python3
# Requires: Python 3.7 (might work on 3.6, but I haven't tested)
# Purpose: Convert a folder full of *.nkit.iso (uncompressed) files into the folder structure needed for use on a modded Wii
# File names: Games must be named like "Game Name [GAMEID].nkit.iso"
# Multi-disc: Multi-disc games must be named like "Game Name (Disc 1) [GAMEID].nkit.iso" and "Game Name (Disc 2) [GAMEID].nkit.iso"
# Notes: Supports both copy and move, if you name your games differently you'll need to modify the script as it was made for my personal use
# TODO:
# - Better documentation
#!/usr/bin/env python3
# Requires: Python 3.7 (might work on 3.6, but I haven't tested)
# Purpose: Rename files such as "Some Game (USA) (En, Fr).gbx" to "Some Game.gbx"
# File Names: This script will operate on any file with the gb, gbc, and gba extension
# Note: Supports both copy and move
import os
import glob
import collections