Skip to content

Instantly share code, notes, and snippets.

Bryce Boe bboe

Block or report user

Report or block bboe

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
@bboe
bboe / set_retention.py
Last active Sep 10, 2019
Set retention on slack conversations with deleted users to 1 day.
View set_retention.py
#!/usr/bin/env python
"""Set retention on slack conversations to 400 days.
Usage: ./set_retention.py [--perform] --token SLACK_TOKEN
The `--perform` flag is necessary to actually perform the action.
Due to the fact that `conversations.setToken` is not part of the public API
the slack legacy token concept will not work. To obtain the API token,
open up slack in the browser and observe networking traffic while performing
@bboe
bboe / bits.txt
Last active Dec 27, 2017
Level XM17
View bits.txt
010000 1
010010 1
001010 4
110010 0
100010 4
100010 4
110101 3
010011 1
010110 1
001000 2
@bboe
bboe / NOTES.txt
Last active Aug 23, 2017
BBoe's Updates to "How To Make A reddit Bot — Part One"
View NOTES.txt
Intro:
I'm Bryce (/u/bboe) Author of PRAW
/u/busterroni's Submission:
https://www.reddit.com/r/learnpython/comments/5ury27/heres_a_tutorial_i_made_on_creating_a_reddit_bot/
/u/busterroni's Part 1:
https://www.youtube.com/watch?v=krTUf7BpTc0
@bboe
bboe / 01_sequential.rb
Last active Oct 11, 2017
Ruby Simple TCP Echo Servers
View 01_sequential.rb
#!/usr/bin/env ruby
require './common.rb'
require 'socket'
def main
server = server_socket('0.0.0.0', 1024)
loop do
handle_client(*server.accept)
end
View keybase.md

Keybase proof

I hereby claim:

  • I am bboe on github.
  • I am bboe (https://keybase.io/bboe) on keybase.
  • I have a public key ASCnZHoRFWpVE71FNpfWZCGn8V2Dq8V6jvoiYOz14NFOfwo

To claim this, I am signing this object:

@bboe
bboe / github_protect_master.py
Created Dec 15, 2015
Enable master branch protection on all github repositories you are an owner of.
View github_protect_master.py
#!/usr/bin/env python
from __future__ import print_function
REPO_URL = 'git+git://github.com/sigmavirus24/github3.py.git'
import os
import sys
try:
from github3 import login
except ImportError:
@bboe
bboe / image_attachment_downloader.py
Last active Aug 29, 2015
Email image attachment download (POP3 support only for now)
View image_attachment_downloader.py
#!/usr/bin/env python
from __future__ import print_function
from functools import wraps
from getpass import getpass
from hashlib import sha512
from poplib import POP3_SSL, error_proto
import email
import os
import socket
import sys
@bboe
bboe / reddit_oauth.py
Created Jun 5, 2015
Create permanent reddit oauth tokens
View reddit_oauth.py
#!/usr/bin/env python
"""Script to generate permenant OAuth tokens for the desired reddit scope."""
from __future__ import print_function
import os
import praw
import sys
from pprint import pprint
@bboe
bboe / parse_email_list.js
Last active Aug 29, 2015
Javascript email list parser with display name
View parse_email_list.js
function display_name(text) {
/* Remove all quotes
Remove whitespace, brackets, and commas from the ends. */
return text.replace(/(^[\s,>]+)|"|([\s,<]+$)/g, '');
}
function emails(addr_list) {
/* Regex source:
https://html.spec.whatwg.org/multipage/forms.html#valid-e-mail-address
*/
@bboe
bboe / rabbit_admin.py
Created Oct 17, 2014
Tool to interact with rabbitmq queues. Depends on docopt and pika (pip install docopt pika).
View rabbit_admin.py
#!/usr/bin/env python
"""Usage: rabbit_admin [options] delete QUEUE
rabbit_admin [options] add QUEUE <KEY:VALUE>...
rabbit_admin [options] dump QUEUE
-D --not-durable don't use a durable queue
-h --help show this
-H --host HOST rabbitmq host [default: localhost]
"""
You can’t perform that action at this time.