Skip to content

Instantly share code, notes, and snippets.

@benjyfeen
benjyfeen / cloudwatch_setup.sh
Created August 19, 2018 22:34 — forked from sylwit/cloudwatch_setup.sh
Setup cloudwatch alarms with lambda function
# Create EC2 instance, EBS alarms for all resources in a region
import os
import boto3
# SNS Topic Definition for EC2, EBS
instance_ids = os.environ.get('INSTANCE_ID').split('#')
ec2_sns = os.environ.get('SNS_TOPIC_ARN') # arn:aws:sns:ca-central-1:476697408772:cloudwatch-monitoring
ebs_sns = os.environ.get('SNS_TOPIC_ARN') # arn:aws:sns:ca-central-1:476697408772:cloudwatch-monitoring
# AWS Account and Region Definition for Reboot Actions
@benjyfeen
benjyfeen / benchmark.py
Created February 15, 2018 21:58 — forked from PolarNick239/benchmark.py
PhotoScan benchmark for Dense Cloud and alignment
import PhotoScan
from time import time
# wget https://www.dropbox.com/s/hh5yg0fmpr4bpn3/benchmarking_1.3.zip
# unzip benchmarking_1.3.zip
project = "benchmark2.psz"
PhotoScan.app.gpu_mask = (2 ** 16) - 1
PhotoScan.app.cpu_enable = False
@benjyfeen
benjyfeen / osx_bootstrap.sh
Created November 17, 2017 03:10 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)
@benjyfeen
benjyfeen / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Created November 17, 2017 02:29 — forked from whizzzkid/XPS-15 9560 Getting Nvidia To Work on KDE Neon
Making Nvidia Drivers + CUDA 8 + Bumblebee work together on XPS 15 Early 2017 9560 kabylake. Ubuntu, KDE Neon, Linux Mint, debian.
# Instructions for 4.13 and cuda 9.0 RC
# If upgrading from 4.11 and cuda 8.0
$ sudo apt-get purge --auto-remove libcud*
$ sudo apt-get purge --auto-remove cuda*
$ sudo apt-get purge --auto-remove nvidia*
# also remove the container directory direcotory at /usr/local/cuda-8.0/
# Install Intel Graphics Patch Firmwares (This should reboot your system):
bash -c "$(curl -fsSL http://bit.ly/IGFWL-install)"