None of this is really necessary now that the Docker team is releasing official Mac OS X binary builds. Please see moby/moby#3337 for details.
inotifywait -m -e moved_to $BASE | while read line | |
do | |
F=$(echo $line | cut -f3 -d" ") | |
echo "Now uploading $F" | |
s3cmd --force --no-progress put $F s3://mybucket/ & | |
done |
/* | |
-------------------------------- | |
imgur Upload | |
-------------------------------- | |
+ https://github.com/pinceladasdaweb/imgur-upload | |
+ version 1.1 | |
+ Copyright 2014 Pedro Rogerio | |
+ Licensed under the MIT license | |
+ Documentation: https://github.com/pinceladasdaweb/imgur-upload |
# modified from http://stackoverflow.com/questions/1401904/painless-way-to-install-a-new-version-of-r-on-windows | |
# run on old computer / r version | |
setwd("/Users/Florian/Dropbox/temp") # or any other existing temp directory | |
packages <- installed.packages()[,"Package"] | |
save(packages, file="Rpackages") | |
# run on new computer / r version | |
setwd("/Users/Florian/Dropbox/temp") # or any other existing temp directory |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
#How I built an audio book reader for my nearly blind grandfather
Last year, when visiting my family back home in Holland, I also stopped by my grand-parents. My grand-father, now 93 years old, had always been a very active man. However, during the presceding couple of months, he'd gone almost completely blind and now spent his days sitting in a chair. Trying to think of something for him to do, I suggested he try out audio books. After finally convincing him -- he said audio books were for sad old people -- that listening to a well performed recording is actually a wonderful experience, I realized the problem of this idea.
####The problem with audio devices and the newly blind. After my first impulse to jump up and go buy him an
from dateutil import rrule | |
import datetime | |
# Generate ruleset for holiday observances on the NYSE | |
def NYSE_holidays(a=datetime.date.today(), b=datetime.date.today()+datetime.timedelta(days=365)): | |
rs = rrule.rruleset() | |
# Include all potential holiday observances | |
rs.rrule(rrule.rrule(rrule.YEARLY, dtstart=a, until=b, bymonth=12, bymonthday=31, byweekday=rrule.FR)) # New Years Day |
--- | |
swagger: "2.0" | |
basePath: "/test" | |
schemes: | |
- "https" | |
paths: | |
/lambdaredirect-default: | |
get: | |
produces: | |
- "application/json" |
# -*- coding: utf-8 -*- | |
from flask import Flask, request, redirect, url_for, session, abort, current_app, json | |
app = Flask(__name__) | |
# This is the very unsecret key from the Flask-docs | |
app.secret_key = 'A0Zr98j/3yX R~XHH!jmN]LWX/,?RT' | |
@app.route('/') |
""" | |
MIT License | |
Copyright (c) 2016 Michael Shihrer ([email protected]) | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |