Author: Chris Lattner
#!/usr/bin/env python3 | |
import appdirs | |
from imgurpython import ImgurClient | |
from watchdog.observers import Observer | |
from watchdog.events import FileSystemEventHandler | |
from pync import Notifier | |
import os | |
import json |
- Laws of Simplicity
- Designing for Emotion
- The Age of the Platform
- Design of Everyday Things
- Release It!
- Mythical Man Month
- Peopleware
- Inspired
- Agile Project Management with Scrum
- Distributed Systems, principles and paradigms
This simply requires you to install the boto3
package and set the DOCKER_BUCKET
variable to point at the bucket you would like to clean up, and the rest should be handled automatically. That's is presuming you have credentials to manage the S3 bucket in one of the default locations where Boto go to look for them.
Since the script more or less traverses through your entire S3 bucket, it probably makes sense to only run it infrequently, like daily or weekly, depending on the amount of repositories and layers you have and the amount of updates on the registry in total.
Since 2008 or 2009 I work on Apple hardware and OS: back then I grew tired of Linux desktop (which is going to be MASSIVE NEXT YEAR, at least since 2001), and switched to something that Just Works. Six years later, it less and less Just Works, started turning into spyware and nagware, and doesn't need much less maintenance than Linux desktop — at least for my work, which is system administration and software development, probably it is better for the mythical End User person. Work needed to get software I need running is not less obscure than work I'd need to do on Linux or othe Unix-like system. I am finding myself turning away from GUI programs that I used to appreciate, and most of the time I use OSX to just run a terminal, Firefox, and Emacs. GUI that used to be nice and unintrusive, got annoying. Either I came full circle in the last 15 years of my computer usage, or the OSX experience degraded in last 5 years. Again, this is from a sysadmin/developer ki
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener { | |
public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName(); | |
private int previousTotal = 0; // The total number of items in the dataset after the last load | |
private boolean loading = true; // True if we are still waiting for the last set of data to load. | |
private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more. | |
int firstVisibleItem, visibleItemCount, totalItemCount; |
import logging | |
from traceback import format_exc | |
import datetime | |
from schedule import Scheduler | |
logger = logging.getLogger('schedule') |
import org.gradle.api.tasks.Exec | |
defaultTasks 'bower' | |
// Get the path for the locally installed binaries | |
task npmBin << { | |
new ByteArrayOutputStream().withStream { os -> | |
def result = exec { | |
executable = 'npm' | |
args = ['bin'] |
#!/usr/bin/env python | |
# I had a script which I wanted to have a special option that short-circuited the normal | |
# argument parsing error handling behavior so that it could be run without thenormal | |
# required arguments. This option would work similar to how `--help` or `--version` | |
# works, except that the parser would return a valid args object in its presence | |
# rather than exiting the program. | |
import argparse |