Skip to content

Instantly share code, notes, and snippets.

Nick Hurst NickHurst

Block or report user

Report or block NickHurst

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
View README.md

Bot Name

Installations

This script requires python 3, praw, and praw-oauth2util.

To install praw type in your command line:

@NickHurst
NickHurst / 0_reuse_code.js
Created Nov 8, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View archive_posts.py
import time
import praw
import sqlite3
from datetime import datetime
def archive_posts(u, sql, c):
submissions = u.get_submitted(sort='new', time='all', limit=None)
print('Archiving submissions...')
for subm in submissions:
View README.md

Bot Name

Installations

This script requires python 3, praw, and praw-oauth2util.

To install praw type in your command line:

View README.md

Flair Reminder

Installations

This script requires python 3, praw, and praw-oauth2util.

To install praw type in your command line:

View README.md

Installations

This script requires python 3, praw, and praw-oauth2util.

To install praw type in your command line:

pip install praw
pip install praw-oauth2util
View tk_oop.py
import Tkinter as tk
class NameOfYourApp(tk.Tk):
def __init__(self, *args, **kwargs):
tk.Tk.__init__(self, *args, **kwargs)
# sets it to full screen (but windowed) on OS X
self.geometry("{0}x{1}+0+0".format(self.winfo_screenwidth(), self.winfo_screenheight()))
self.menubar = tk.Menu(self)
View find_if_username_exists.py
import praw
# User config
# ---------------------------------------------------------
# the file name containing usersnames to check
INFNAME = 'usernames.txt'
# the file name containing available usernames
OUTFNAME = 'avail_usersnames.txt'
# ---------------------------------------------------------
@NickHurst
NickHurst / shower_thoughts_tk.py
Last active Sep 25, 2015
Displays the current hot posts on /r/ShowerThoughts via tkinter
View shower_thoughts_tk.py
import praw
import Tkinter as tk
class ShowerThoughtsDisplay(tk.Tk):
def __init__(self, *args, **kwargs):
tk.Tk.__init__(self, *args, **kwargs)
# set it to full screen, works on linux but not on OS X, untested on Windows
self.attributes('-fullscreen', True)
# sets it to full screen (but windowed) on OS X
self.geometry("{0}x{1}+0+0".format(self.winfo_screenwidth(), self.winfo_screenheight()))
View ModAppTools.py
import traceback
import time
import praw
import sqlite3
import urllib
import datetime
""" USER CONFIG """
FORWARD_FROM = "NotTheOnionBot"
You can’t perform that action at this time.