Skip to content

Instantly share code, notes, and snippets.

Chris Streeter streeter

Block or report user

Report or block streeter

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@streeter
streeter / EmojiPointersDemo.swift
Created Sep 19, 2018 — forked from cellularmitosis/EmojiPointersDemo.swift
Representing pointer values as emoji can be useful for "visually" debugging certain issues, like cell reuse, etc.
View EmojiPointersDemo.swift
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
let window = UIWindow(frame: UIScreen.main.bounds)
@streeter
streeter / prime.md
Last active Apr 30, 2018
Extend Amazon Prime
View prime.md

Here's what you need to do to keep paying $99 for Prime:

  1. If you are already subscribe to Prime, head to your Prime cancelation page and cancel your current Prime subscription by clicking on "End My Benefits." Don't worry, you'll still have Prime benefits until your membership expires.
  2. Purchasing a one-year voucher for $99. If after purchasing you decide you don’t want to do this, you can redeem it for an Amazon giftcard for free, so you don't lose any money (and you can buy multiple Prime gifts if you want to stock up, they don’t expire).
  3. Make sure to set a calendar reminder for your last day of Prime benefits, so you can apply the Prime membership giftcard.

Worth noting - if you have a grandfathered Amazon Prime account with full family features (prior to August 2015), this may remove those benefits. If you're still using thos

@streeter
streeter / DropboxIgnore.md
Created Mar 5, 2018 — forked from idleberg/DropboxIgnore.md
Ignore node_modules/bower_components folders in your Dropbox
View DropboxIgnore.md

This script scans your Dropbox (or any given folder) for folders stored in the ignore array and excludes them from syncing. Makes use of the official Dropbox CLI

I'm a beginner at bash, so all improvements are welcome!

#!/bin/bash

set -e

# SETTINGS
@streeter
streeter / FCPrivateBatteryStatus.m
Created Mar 14, 2016 — forked from marcoarment/FCPrivateBatteryStatus.m
How to get raw battery info (mAh remaining, etc.) from iOS using private APIs. For internal testing only, NOT APP STORE DISTRIBUTION!
View FCPrivateBatteryStatus.m
#import <Foundation/Foundation.h>
#include <dlfcn.h>
NSDictionary *FCPrivateBatteryStatus()
{
static mach_port_t *s_kIOMasterPortDefault;
static kern_return_t (*s_IORegistryEntryCreateCFProperties)(mach_port_t entry, CFMutableDictionaryRef *properties, CFAllocatorRef allocator, UInt32 options);
static mach_port_t (*s_IOServiceGetMatchingService)(mach_port_t masterPort, CFDictionaryRef matching CF_RELEASES_ARGUMENT);
static CFMutableDictionaryRef (*s_IOServiceMatching)(const char *name);
@streeter
streeter / backprint_scraper.py
Last active Jul 24, 2016
Scrape the backprint.com event photo site and download the largest sized images from guessable URLs
View backprint_scraper.py
#!/usr/bin/env python
import os
import re
import requests
event = 138191
bibs = (496, )
@streeter
streeter / pelican_deployer.py
Created Mar 10, 2016 — forked from marksteve/pelican_deployer.py
Push-to-deploy static sites with Pelican, Flask and Github
View pelican_deployer.py
"""
Simple web server that listens for Github webhooks to implement push-to-deploy
with Pelican static sites
Settings are loaded from a json file except for SECRET which should be an
environment variable
Example `deployer.json`
{
@streeter
streeter / heroku-nginx-logging.md
Created Feb 9, 2016 — forked from simonw/heroku-nginx-logging.md
How to get Heroku to log full user_agent strings using nginx
View heroku-nginx-logging.md

How to get Heroku to log full user_agent strings using nginx

Heroku's default logging format omits user agent and referrer strings - but these are useful to have! Especially if you want to be able to run your own analysis on what kind of browsers are using your service.

A default Heroku log line looks like this:

heroku/router:  at=info method=GET path="/page-on-your-site/"
    host=your-site.herokuapp.com
View cleanup_redis_tsdb.py
#!/usr/bin/env python
from sentry.utils.runner import configure
configure(config_path='sentry.conf.py')
from datetime import datetime, timedelta
from sentry.app import tsdb
def cleanup_connection(connection, epoch):
def delete(key):
View adams-heroku-values.md

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@streeter
streeter / .gitignore
Last active Aug 29, 2015
Fix running Chrome on Mac OS 10.10.2 (14C68m)
View .gitignore
patch.dylib
You can’t perform that action at this time.