Skip to content

Instantly share code, notes, and snippets.

Avatar

Paul Carlton paulresdat

  • Resource Data Inc
  • Anchorage
View GitHub Profile
@paulresdat
paulresdat / servicecollection.dart
Last active Nov 8, 2021
C# style service collection in dart
View servicecollection.dart
enum ServiceMetaDataType {
singleton,
transient,
}
class ServiceMetaData<T> {
late dynamic _instanceFunc;
T? _instance;
late final List<String> _dependencies;
late final ServiceMetaDataType _serviceType;
View git-shortcuts-zsh.sh
## README
# This is the only file needed if you are working off of zsh
# and have Oh-my-zsh installed.
git-diff() {
correct=$(git diff 2>&1)
if [[ $correct = *"Not a git repository"* ]]; then
echo $correct
return
fi
@paulresdat
paulresdat / events.dart
Last active Oct 26, 2020
Event Handling in Dart
View events.dart
Type typeof<T>() => T;
typedef void DelegateHandler<T>(T response);
abstract class IHandler {
void run(dynamic response);
bool isType<T>(T type);
dynamic get();
}
class Handler<T> implements IHandler {
View vst-installation.sh
#!/bin/bash
# this is just a quick script I created in bash to install and backup vsts that aren't installable
# ie you have to manually put them into the VST and Components folders, easier to just go the folder via
# the terminal and run this rather than go and find the folder and copy paste over
#/Volumes/LaCie/documents/Keep/VST-MANUAL
#/Library/Audio/Plug-Ins/VST
#/Library/Audio/Plug-Ins/Components
# install vsts
@paulresdat
paulresdat / git-shortcuts.sh
Last active Aug 1, 2019
Handy automated bash commands for git
View git-shortcuts.sh
#!/usr/bin/bash
git-diff() {
correct=$(git diff 2>&1)
if [[ $correct = *"Not a git repository"* ]]; then
echo $correct
return
fi
if [ $# -eq 0 ]; then
@paulresdat
paulresdat / automate-build.js
Last active Apr 26, 2018
ALVIN on jenkins: automates building when random unit test failures keep happening on a branch
View automate-build.js
(function($) {
var timeSet = 0;
var count = 0;
var log = false;
function check()
{
setTimeout(function() {
timeSet = 10000;
var title = $('img', $('a', $('table'))).attr('title');
if (title == 'Success > Console Output') {