Skip to content

Instantly share code, notes, and snippets.

streeter / get_channels.js
Created Mar 25, 2022 — forked from felixrieseberg/get_channels.js
Slack: Get a list of your channels (excluding DMs, group chats, and archived/private channels)
View get_channels.js
// Open up the Slack Developer Tools by entering "/slackdevtools"
// in the message input.
// First, run this. The client will reload.
// Then, get channels. See "filterChannels" to remove channels
// beginning with a certain prefix.
(function getMyChannels() {
const allChannels = slackDebug.storeInstance.getStateByTeamId(slackDebug.activeTeamId).channels.__proto__
streeter /
Created Feb 25, 2022 — forked from leosunmo/
intensifies Slack emoji creator
# Generate a `:something-intensifies:` Slack emoji, given a reasonable image
# input. I recommend grabbing an emoji from
set -euo pipefail
if ! command -v identify &> /dev/null
if [ "$(uname)" == "Darwin" ]; then
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
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
let window = UIWindow(frame: UIScreen.main.bounds)
streeter /
Last active Apr 30, 2018
Extend Amazon Prime

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 /
Created Mar 5, 2018 — forked from idleberg/
Ignore node_modules/bower_components folders in your Dropbox

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!


set -e

streeter / FCPrivateBatteryStatus.m
Created Mar 14, 2016
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 /
Last active Jul 24, 2016
Scrape the event photo site and download the largest sized images from guessable URLs
#!/usr/bin/env python
import os
import re
import requests
event = 138191
bibs = (496, )
streeter /
Created Mar 10, 2016 — forked from marksteve/
Push-to-deploy static sites with Pelican, Flask and Github
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 /
Created Feb 9, 2016 — forked from simonw/
How to get Heroku to log full user_agent strings using nginx

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/"

#!/usr/bin/env python
from sentry.utils.runner import configure
from datetime import datetime, timedelta
from import tsdb
def cleanup_connection(connection, epoch):
def delete(key):