Skip to content

Instantly share code, notes, and snippets.

@ludwig
ludwig / ubuntu16_tensorflow_cuda8.sh
Created February 5, 2018 18:27 — forked from ksopyla/ubuntu16_tensorflow_cuda8.sh
How to set up tensorflow with CUDA 8 cuDNN 5.1 in virtualenv with Python 3.5 on Ubuntu 16.04 http://ksopyla.com/2017/02/tensorflow-gpu-virtualenv-python3/
# This is shorthened version of blog post
# http://ksopyla.com/2017/02/tensorflow-gpu-virtualenv-python3/
# update packages
sudo apt-get update
sudo apt-get upgrade
#Add the ppa repo for NVIDIA graphics driver
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@ludwig
ludwig / brew-perms.sh
Created July 2, 2017 11:29 — forked from jaibeee/brew-perms.sh
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
@ludwig
ludwig / brew-perms.sh
Created July 2, 2017 11:29 — forked from jaibeee/brew-perms.sh
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
@ludwig
ludwig / Ansible-Vault how-to.md
Created April 29, 2017 09:24 — forked from tristanfisher/Ansible-Vault how-to.md
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

##Working with ansible-vault

I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

@ludwig
ludwig / infra-secret-management-overview.md
Created April 29, 2017 08:16 — forked from maxvt/infra-secret-management-overview.md
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@ludwig
ludwig / clean_up_boot.sh
Created April 1, 2017 03:37 — forked from lloeki/clean_up_boot.sh
Clean up /boot of unused Ubuntu (and Debian?) kernels
# Ubuntu has a stupid policy of not cleaning up boots because they deem
# unknowable whether a kernel is valid or not (even if booted). Combined with
# the default Ubuntu setup that creates a ridiculously small /boot that is
# bound to be filled in a few months worth of updates, you have a recipe for a
# failure during upgrade, leading to being unable to update or remove anything
# and having to mess with apt and dpkg innards by hand.
# This may work for Debian too.
# This one liner keeps /boot fresh and clean by removing the currently
# running kernel version as well as the latest one (which may not be
@ludwig
ludwig / RemappingKeys.ahk
Created March 15, 2017 04:51
AHK Settings
#NoEnv
#SingleInstance Force
; Some reading to do:
; https://www.autohotkey.com/docs/Hotkeys.htm
; https://www.autohotkey.com/docs/misc/Remap.htm
; https://www.autohotkey.com/docs/KeyList.htm
; Turn caps-lock into ctrl key (for vim & emacs)
CapsLock::Ctrl
@ludwig
ludwig / recover_source_code.md
Created March 12, 2017 06:54 — forked from simonw/recover_source_code.md
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@ludwig
ludwig / aws.sh
Created February 21, 2017 00:13 — forked from mv/aws.sh
AWS Command Line Tools: using MacOS and brew
#!/bin/bash
#
# using ec2 tools
#
# Marcus Vinicius Fereira ferreira.mv[ at ].gmail.com
# 2011-11
###
### programs