Skip to content

Instantly share code, notes, and snippets.

I've left some instances out. These are ones I tend to use. This is also only for us-east-1. Feel free to add rows in the comments.

size nov 2016 pricing dec 2016 pricing pct savings monthly savings
t2.nano 0.0065 0.0059 9.23% $0.432
t2.micro 0.013 0.012 7.69% $0.720
t2.small 0.026 0.023 11.54% $2.160
t2.medium 0.052 0.047 9.62% $3.600
t2.large 0.104 0.094 9.62% $7.200
m4.large 0.12 0.108 10.00% $8.640
@tedder
tedder / gist:b6af9b01fd422450fc3dea37dd982fd4
Created January 14, 2017 04:40
duplicity b2backend progress patch
$ diff b2backend.py b2backend-changes.py
30c30
< from duplicity import log
---
> from duplicity import log, progress
116a117,119
> file_size = os.path.getsize(source_path.name)
> progress.report_transfer(0, file_size)
>
122c125
@tedder
tedder / gist:7181a73ca05736d0b5da0bd6c94f2094
Created March 9, 2017 20:25
motion.conf relevant settings
width 1280
height 720
framerate 15
minimum_frame_time 0
netcam_url rtsp://192.168.0.31:554/live/ch0
netcam_keepalive on
netcam_tolerant_check off
auto_brightness off
brightness 0
contrast 0
{
"Statement" : [
{
"Effect" : "Deny",
"Action" : "Update:*",
"Principal": "*",
"Resource" : "*",
"Condition" : {
"StringEquals" : {
"ResourceType" : ["AWS::RDS::DBInstance"]
@tedder
tedder / octoprint.log
Created January 21, 2018 21:35
octoprint 500 error from upload with invalid extension
2018-01-21 21:23:55,291 - octoprint - ERROR - Exception on /api/files/local [POST]
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/oprint/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/oprint/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/pi/oprint/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
@tedder
tedder / serial.log.2018-06-24_16-37-34
Created June 25, 2018 16:41
M300/mini delta timeout
This file has been truncated, but you can view the full file.
2018-06-24 15:35:31,749 - Changing monitoring state from "Offline" to "Detecting serial port"
2018-06-24 15:35:31,775 - Serial port list: ['/dev/ttyACM0']
2018-06-24 15:35:31,776 - Connecting to: /dev/ttyACM0
2018-06-24 15:35:31,776 - Using Malyan/Monoprice Connection Fix Plugin to create serial connection
2018-06-24 15:35:31,780 - Changing monitoring state from "Detecting serial port" to "Opening serial port"
2018-06-24 15:35:31,782 - Connected to: Serial<id=0x6d758610, open=True>(port='/dev/ttyACM0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=30.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
2018-06-24 15:35:31,785 - Starting baud rate detection
2018-06-24 15:35:31,794 - Changing monitoring state from "Opening serial port" to "Detecting baudrate"
2018-06-24 15:35:31,861 - Trying baudrate: 115200
2018-06-24 15:35:31,871 - Send: N0 M110 N0*125
@tedder
tedder / avrdude -vvv
Created August 27, 2018 20:24
avrdude: initialization failed, rc=-1
$ [..]avrdude -C[..]avrdude/6.3.0-arduino9/etc/avrdude.conf -vvv -pattiny85 -cstk500 -P/dev/cu.usbmodem00221792 -Uflash:w:/var/fo[..]/arduino_build_328240/Blink.ino.hex:i
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:01:35
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is [..]avrdude/6.3.0-arduino9/etc/avrdude.conf"
User configuration file is "/Users/ted/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
@tedder
tedder / stock.gcode
Created September 10, 2018 21:59
monoprice mini delta starting gcode
; Monoprice Mini Delta
M140 S[first_layer_bed_temperature] ; set bed temp
M190 S[first_layer_bed_temperature] ; wait for bed temp
M104 S[first_layer_temperature] T0 ; set extruder temp
M109 S[first_layer_temperature] T0 ; wait for extruder temp
G92 E0 ; reset extrusion distance
G28 ; Start from home position
G1 E-6 F900 ; retract 6mm of filament before starting the bed leveling process
G92 E0 ; reset extrusion distance
G4 S5 ; Pause for 5 seconds to allow time for removing extruded filament
@tedder
tedder / vc2.py
Created November 2, 2018 23:13
py check throttling on raspberry pi
# the following is distilled (reduced) from `py-videocore`, which has a larger purpose but
# happens to include these methods. The following has a MIT license.
# source: https://github.com/nineties/py-videocore
import os
from array import array
from struct import calcsize, pack_into, unpack_from
from fcntl import ioctl
IOCTL_MAILBOX = 0xC0046400 # _IOWR(100, 0, char *)
@tedder
tedder / Makefile
Last active November 22, 2018 17:20
avrdude for tiny43
TOOLPATH = /Applications/Arduino_187.app/Contents/Java/hardware/tools/avr/bin
DEVICE = t43u
SERIAL_PORT = -P /dev/cu.usbmodem00221792
PROGRAMMER = -c stk500v2
OBJECTS = main.o
FUSES =
CLOCK = 1000000 # 1 MHz
AVRDUDE = $(TOOLPATH)/avrdude $(PROGRAMMER) $(SERIAL_PORT) -p $(DEVICE) -C /Applications/Arduino_187.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf