Skip to content

Instantly share code, notes, and snippets.

View binarybrat's full-sized avatar

Cloei binarybrat

View GitHub Profile
@binarybrat
binarybrat / 0_reuse_code.js
Last active September 12, 2015 07:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
import praw
import time
import sqlite3
import datetime
import traceback
'''USER CONFIGURATION'''
APP_ID = ""
APP_SECRET = "-Y"
@binarybrat
binarybrat / youtubespamtracking.py
Created June 4, 2016 14:48
Testing/Playing with portion of aperson's modbot
class YoutubeSpam(Filter):
def __init__(self, reddit, youtube):
Filter.__init__(self)
self.tag = "[Youtube Spam]"
self.reddit = reddit
self.y = youtube
def _isVideo(self, submission):
'''Returns video author name if this is a video'''
if submission.domain in ('m.youtube.com', 'youtube.com', 'youtu.be'):
@binarybrat
binarybrat / automod-schedule
Last active July 19, 2016 04:34
Automoderator set up for a daily schedule by months of the year aka every 12 days
##### If you edit this page, you must [click this link, then click "send"](http://www.reddit.com/message/compose/?to=AutoModerator&subject=anxiety&message=schedule) to have AutoModerator re-load the schedule from here
---
first: "July 19, 2016 6:00 AM -07"
repeat: 12 days
title: "This is for January"
text: |
This is the body part
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
function calcEffec(input,numbers) {
for (var i = 0; i<input.length; i++)
{
for (var j = 1; j<numbers[i]; j++)
{
input.push(input[i]);
}
}
input.sort();
@binarybrat
binarybrat / removalsLNM.py
Created November 26, 2016 09:23
Scans sub modlog and grabs info when I mod removes a post (other than automoderator) then loads info to database.
import praw
import config #has my reddit oauth info stuff
import string
import json
import traceback
import sqlite3
MODLIST = {'10thTARDIS', 'maximumhel', 'Skangryph', 'girlietrex', 'ri0tnrrd', 'SmileyFace', 'Mumbah_', 'Luminous_Nox'}
MAX = 1000
@binarybrat
binarybrat / reddit sidebar updater
Created June 8, 2017 19:00
Having issues it keeps giving me an error on line #208 unsure what I'm doing wrong
// spiffy sidebar updater
//el https://github.com/chromakode/reddit-sidebar-updater
//
// Copyright (c) 2014 Max Goodman.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
@binarybrat
binarybrat / afternoon discord.css
Created November 2, 2017 14:17 — forked from brussell98/afternoon discord.css
My custom theme for Discord. Made for dark theme
.app a {
color: #5294E2
}
.titlebar {
height: 5px
}
.guilds-wrapper {
background: #2a2f38
}
.guilds-wrapper .guilds .guild+.guild {
@binarybrat
binarybrat / randomfacts.py
Created February 13, 2018 14:23
Old random facts script
#!/usr/bin/python
import praw
import time
import sys
import random
#description of your bot
r = praw.Reddit(user_agent='')