Skip to content

Instantly share code, notes, and snippets.

Avatar

Ted Timmons tedder

View GitHub Profile
@tedder
tedder / gist:b6af9b01fd422450fc3dea37dd982fd4
Created Jan 14, 2017
duplicity b2backend progress patch
View gist:b6af9b01fd422450fc3dea37dd982fd4
$ 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
View ec2-repricing-dec2016-east.md

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
View gist:a58c4a8e200f5ee2ac74cfe5b51a1431
==> /var/log/messages <==
Oct 5 23:03:37 pidoor kernel: [32124.463381] cfg80211: Regulatory domain changed to country: US
Oct 5 23:03:37 pidoor kernel: [32124.463413] cfg80211: DFS Master region: FCC
Oct 5 23:03:37 pidoor kernel: [32124.463424] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
Oct 5 23:03:37 pidoor kernel: [32124.463441] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
Oct 5 23:03:37 pidoor kernel: [32124.463457] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 1700 mBm), (N/A)
Oct 5 23:03:37 pidoor kernel: [32124.463471] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2300 mBm), (0 s)
Oct 5 23:03:37 pidoor kernel: [32124.463484] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
Oct 5 23:03:37 pidoor kernel: [32124.463496] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
@tedder
tedder / gist:cdbb57bf5bd08b7e6562f1614312f537
Created May 30, 2016
google cloud vision starter script.py
View gist:cdbb57bf5bd08b7e6562f1614312f537
#!/usr/bin/python
# these should be sufficient to get you started.
# https://cloud.google.com/vision/reference/rest/v1/images/annotate#request-body
# https://cloud.google.com/vision/docs/pricing
# https://cloud.google.com/vision/docs/auth-template/cloud-api-auth#setting_up_your_project
from oauth2client.service_account import ServiceAccountCredentials
from apiclient.discovery import build
import sys
@tedder
tedder / ledstring.ino
Created Apr 29, 2016
particle.io photon fastled tv backlight controller
View ledstring.ino
//This #include statement was automatically added by the Particle IDE.
#include "Sunrise/Sunrise.h"
#include "FastLED/FastLED.h"
FASTLED_USING_NAMESPACE;
#if FASTLED_VERSION < 3001000
#error "Requires FastLED 3.1 or later; check github for latest code."
View cred-npe.groovy
// Groovy Version: 2.4.6 JVM: 1.8.0_72-internal Vendor: Oracle Corporation OS: Linux
// openjdk version "1.8.0_72-internal"
// to run: groovy -Dgroovy.grape.report.downloads=true cred-npe.groovy
// running in my env:
// docker run -it tedder42/stanson-java8-jre bash
// curl -s get.sdkman.io | bash
// source "$HOME/.sdkman/bin/sdkman-init.sh"
// sdk install groovy
View gist:2ed8fb70647d0cc768f5b9d142408cc6
#include <TinyGPS++/TinyGPS++.h>
#include <SoftwareSerial.h>
/*
This sample sketch demonstrates the normal use of a TinyGPS++ (TinyGPSPlus) object.
It requires the use of SoftwareSerial, and assumes that you have a
4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx).
*/
static const int RXPin = 4, TXPin = 3;
static const uint32_t GPSBaud = 4800;
View gist:00a8856e5904969afd4e
here's what I'm using to push the file to my S3 bucket. The bucket has CloudFront with a SNI-based https cert.
post_tweet_hook = "AWS_PROFILE=pjnet aws s3 cp {twtfile} s3://tedder/twtxt.txt --acl public-read --storage-class REDUCED_REDUNDANCY --cache-control 'max-age=60,public'"
View daveholmes_irs_phishing.json
{
"country_code":"US",
"phone_number":"+12405233767",
"national_format":"(240) 523-3767",
"carrier":{
"mobile_country_code":null,
"mobile_network_code":null,
"name":"Bandwidth SMSEnabled",
"type":"voip",
"error_code":null
View x
Verifying that +tedder42 is my blockchain ID. https://onename.com/tedder42
You can’t perform that action at this time.