Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Baron einsteinx2

View GitHub Profile
@einsteinx2
einsteinx2 / organize_nkit_gc_for_wii.py
Last active Feb 24, 2020
Small python script to convert a folder full of *.nkit.iso files into the folder structure needed for use on a modded Wii
View organize_nkit_gc_for_wii.py
#!/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
@einsteinx2
einsteinx2 / hangfix-intel-e1000e
Last active Feb 13, 2020
ProxMox if-up.d script to fix hanging Intel e1000e Gigabit NIC when a VM has a lot of network usage
View hangfix-intel-e1000e
#!/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 / monitorio - Bash function to monitor the size of a file on disk
Last active Jan 3, 2020
monitorio - Bash function to monitor the size of a file on disk
View 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
View iSubCLA.txt
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 / BalanceCLA.txt
Created Oct 23, 2017
Balance Contributor License Agreement
View BalanceCLA.txt
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
View iSub 4 Missing Functionality
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
View keybase.md

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:

@einsteinx2
einsteinx2 / locking.swift
Last active Mar 2, 2019 — forked from kristopherjohnson/locking.swift
Simple synchronization functions for Swift, wrapping the Cocoa NSLocking classes
View locking.swift
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 {}
View WaveBox Server Notes (2013)
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:
You can’t perform that action at this time.