Skip to content

Instantly share code, notes, and snippets.

@danisla
danisla / README.md
Created June 14, 2019 04:55
MacOS Workstation Setup

Disable Gamepad input for Plex Media Player

PLEX_DIR="${HOME}/Library/Application Support/Plex Media Player"
cat > "${PLEX_DIR}/inputmaps/dualshock4-xbox-emulate.json" <<EOF
{
  "name": "Playstation Dual Shock 4 Windows Mode",
  "idmatcher": "Microsoft.*joystick driver",
  "mapping": {
 }
@danisla
danisla / find_gpu.sh
Last active April 15, 2020 20:46
GCPing and GPU finder command line scripts
#!/bin/bash
# Copyright 2019 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@danisla
danisla / README.md
Last active November 7, 2022 13:59
GKE GPU Sharing Daemonset

GPU Sharing on GKE DaemonSet

NOTE: This is not a Google supported product.

Example Usage

  1. Create a GKE cluster with a GPU node pool:
gcloud container clusters create gpu-sharing-demo --zone us-central1-c
@danisla
danisla / cloud_ep.sh
Created April 3, 2020 16:24
Create Cloud Endpoints DNS
#!/bin/bash
# Copyright 2019 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@danisla
danisla / kube-dns-metrics-exporter.yaml
Created May 21, 2020 18:51
KubeDNS Metrics Exporter to Stackdriver
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@danisla
danisla / nest_api.py
Created May 7, 2022 16:13
Python Library for interacting with the Nest camera API including authorization flow.
#!/usr/bin/env python3
import json
import os
import time
from datetime import datetime
from urllib.parse import quote
from urllib import request, parse
import pytz
sudo nmcli c add con-name wifibridge type ethernet ifname eth0 ipv4.method shared ipv6.method ignore
sudo nmcli con up wifibridge
nmcli con show