Skip to content

Instantly share code, notes, and snippets.

View benjamin-ict's full-sized avatar

Benjamin Phillips benjamin-ict

View GitHub Profile
@benjamin-ict
benjamin-ict / dagger_guide.md
Last active August 19, 2020 20:40
Guide to Dagger

Guide to Dagger

Quick defs

Providing refers to the availability of an object in the Dagger graph. If something provides a class, it adds it to the graph. A class requires its dependencies to be provided in order to injected using Dagger.

Satisfying dependencies

  1. @Inject constructor
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier;
import java.util.Date;
public class ModelHelper {
public static <T> T merge(T local, T remote)
throws IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException {
Class<?> clazz = local.getClass();
Object merged = clazz.getConstructor().newInstance();
@benjamin-ict
benjamin-ict / macbook_setup.md
Last active September 8, 2021 18:36
Macbook setup

Here's whatcha need ta do when you're setting up your new Macbook:

During setup:

  • Don't enable any of the health stuff
  • Enable encryption
  • Allow unlocking with Apple ID on all counts

Install these programs:

@benjamin-ict
benjamin-ict / security_compliance.scpt
Last active January 5, 2021 20:14
Applescript that opens settings, etc and takes screenshots for Inncretech security compliance
set delayLength to 3
set updateDelayLength to delayLength * 10
tell application "About This Mac"
activate
end tell
tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.desktopscreeneffect"

Here's whatcha need ta do when you're setting up your new Windows:

Install these programs:

From the internet: