Skip to content

Instantly share code, notes, and snippets.

View slobodin's full-sized avatar

Nikolay Slobodin slobodin

  • Russia, Saint Petersburg
View GitHub Profile
@slobodin
slobodin / node_exporter-as-systemd-service.md
Created May 31, 2024 16:11 — forked from jarek-przygodzki/node_exporter-as-systemd-service.md
Installing node_exporter as systemd serivice
sudo useradd --system --shell /bin/false node_exporter
curl -fsSL https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz \
  | sudo tar -zxvf - -C /usr/local/bin --strip-components=1 node_exporter-1.3.1.linux-amd64/node_exporter \
  && sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter
// Query all input devices.
// We do this so that we can see them in the log as they are enumerated.
int[] ids = mInputManager.getInputDeviceIds();
for (int id : ids) {
InputDeviceState state = getInputDeviceState(id);
if (state != null && deviceIsJoystick(state.getDevice()))
addJoystick(0);
}
public static boolean isAndroidTV() {
try {
Activity activity = GameActivity.getSharedActivity();
UiModeManager uiModeManager = (UiModeManager) activity.getSystemService(UI_MODE_SERVICE);
if (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION) {
MyLog.i(TAG, "Running on a TV Device");
return true;
} else {
MyLog.i(TAG, "Running on a non-TV Device");
return false;
@slobodin
slobodin / tools-engineer-checklist.md
Created August 14, 2018 07:24 — forked from gorlak/tools-engineer-checklist.md
Tools Engineer Checklist

This list is provided as a guide for tools engineers of all skill levels looking for jobs in the game industry. It's meant as a guide to topics that should be pursued broadly in order to be well spoken in an interview. I doubt any hiring manager requires deep knowedge across every topic, but an ideal candidate would be somewhat knowledgable (aware of its existence if asked directly) with all topics here.

Each list of bullets increases in difficulty, so later bullets are more applicable to senior (or even director) level candidates.

Good luck.

@gorlak

Math