Skip to content

Instantly share code, notes, and snippets.

View dbellotti's full-sized avatar

David Bellotti dbellotti

View GitHub Profile
#! /bin/bash
sudo apt update
sudo apt -y install git
git clone https://github.com/dbellotti/ubuntu-gpu-flasher-setup
cd ubuntu-gpu-flasher-setup
sudo ./setup.sh
@dbellotti
dbellotti / docker-cleanup-resources.md
Last active September 13, 2018 16:56 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

🐳 find and remove naughty containers

// macOS - pathing might be different on your machine

# look for the results using a lot of space (lets say it is `com.docker.driver.amd64-linux)
$ ls -la ~/Library/Containers/com.docker.docker/Data/
@dbellotti
dbellotti / tron-time.go
Last active August 26, 2016 02:10
Trons left before Aug 27, 2016 18:00 PDT
package main
import (
"fmt"
"time"
)
func main() {
tronRunTime := 96 * time.Minute
endTime := time.Date(2016, time.August, 27, 1, 0, 0, 0, time.UTC)
@dbellotti
dbellotti / .gitignore
Last active May 17, 2016 21:48
containers on an overlay
.vagrant
@dbellotti
dbellotti / setup.sh
Created May 11, 2016 00:02
Quickly link profiles from dropbox
#!/bin/bash
set -e
set -u
brew install vundle
ln -s ~/Dropbox/.vimrc ~/.vimrc
ln -s ~/Dropbox/.pairs ~/.pairs
ln -s ~/Dropbox/.pairs ~/.git-authors
@dbellotti
dbellotti / bosh-errand-logs.md
Last active May 10, 2016 18:21
tail logs on bosh errand
bosh ssh onto running errand vm
sudo su
ps ax | grep "bin/test" | tail -n1 | awk '{print $1}' // assuming 3333 is the PID returned
tail -f /proc/3333/fd/{1,2}
package main
import (
"bufio"
"fmt"
"os"
"os/exec"
"path"
"runtime"
"sync"
@dbellotti
dbellotti / cf.rake
Last active December 29, 2015 01:09
# sample rake tasks for deploying to cloud foundry
require 'fileutils'
namespace :cf do
desc 'Deploy to staging on Cloud Foundry'
task :deploy_staging do
deploy('staging')
end