Skip to content

Instantly share code, notes, and snippets.

View Plutor's full-sized avatar
🗯️

Logan Ingalls Plutor

🗯️
View GitHub Profile
@Plutor
Plutor / discord-to-slack-bot.rb
Last active May 16, 2022 21:20 — forked from tomaszwro/discord-to-slack-bot.rb
Discord-to-Slack bot
require "discordrb"
require "httparty"
def notify_slack(message)
HTTParty.post(
# people_who_play_games
"https://hooks.slack.com/services/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
body: JSON.dump({
text: message,
username: "Discord announcement",
@Plutor
Plutor / .bash_stalias
Last active April 2, 2021 13:22
Staylias makes your aliases persist across bash sessions
# Staylias makes your aliases persist across bash sessions.
# To install, save this as .bash_staylias in your home dir add this line to your bashrc:
# source "$HOME/.bash_staylias"
#
# How to use:
# $ alias foo=bar
# $ alias foo
# alias foo=bar
#
# $ alias foo=baz
@Plutor
Plutor / code.py
Last active February 12, 2018 20:13
Fastest posted /r/nfl posts in the last year that linked to tweets
#!/usr/bin/python
import datetime
import json
import re
import requests
import time
USER_AGENT_HEADER = {'User-Agent': 'nfl-fast-tweets/1.0'}
@Plutor
Plutor / randomperl.py
Last active March 11, 2016 17:55
Generate random perl for http://twitter.com/ThisIsPerl
#!/usr/bin/python
import os
import random
import shutil
import subprocess
import sys
import tempfile
perl_binary = '/usr/bin/perl'
// Get a Wordnik API key: http://developer.wordnik.com/
var WORDNIK_API_KEY = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
// Get a Twitter app key: https://apps.twitter.com/
var TWITTER_CONSUMER_KEY = "YYYYYYYYYYYYYYYYYYYYYYYYYYYYY";
var TWITTER_CONSUMER_SECRET = "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ";
// Email to send errors to
var ERROR_EMAIL_ADDR = "lingalls@gmail.com"
function Start() {
// Delete exiting triggers, if any
@Plutor
Plutor / alphabet_minus_word.sh
Last active August 31, 2015 13:12
Longest words spellable with alphabet blocks minus a word
# We own a set of alphabet blocks. There are 24 of them: one letter on each
# (with drawings of things that start with that letter), and X, Y, and Z are all
# on one block. We took the letters for our daughters name (no repeats, phew!)
# and they sit on a shelf in her room. The rest are with her toys in the living
# room.
#
# Here's how I figured out the longest words I could spell with the remaining
# blocks (buchwald, plutarch, abruptly, upwardly, watchful, and wrathful).
cat $WORDFILE | # Replace with a word file on your machine, probably one in /usr/share/dict/ \
@Plutor
Plutor / UberBut.js
Last active December 6, 2019 08:57
Script that runs @UberBut
// Get a Wordnik API key: http://developer.wordnik.com/
var WORDNIK_API_KEY = "XXXX";
// Get a Twitter app key: https://apps.twitter.com/
var TWITTER_CONSUMER_KEY = "XXXX";
var TWITTER_CONSUMER_SECRET = "XXXX";
function Start() {
// Delete exiting triggers, if any
var triggers = ScriptApp.getProjectTriggers();
for (var i = 0; i < triggers.length; i++) {
Result result;
if (!Something(&result)) {
HandleError();
}
@Plutor
Plutor / nfl-pre-sos-vs-actual.awk
Last active August 29, 2015 14:15
NFL Strength of Schedule prediction correlation
# Results are in: https://docs.google.com/spreadsheets/d/1ucx9dgnYq83QDZv0nR1Ts1qXMQplqMRyiTlkJgZUQoU/edit?usp=sharing
#
# awk -f nfl-pre-sos-vs-actual.awk nfl-all-games.csv
BEGIN {
FS=","
print "Season,Team,Actual SOS,Predicted SOS"
}
/^Season/ { next }
@Plutor
Plutor / README.md
Last active December 11, 2021 16:06
Belichick quote generator
$ python belichick_generator.py 

Q: Danny Amendola had a big kickoff return.

BB: Yeah, they have a complementary play that goes with it out of those same groups and same looks. They just shuffle them around the next week so after four or five games, you have a lot of different elements to the position that he plays and the coverages that he's involved with. But I think his running vision, ability to set up blocks and understanding blocking schemes as they relate to the kicking game – five, six guys that are pretty much on every team. Then you have your specialists and then you go play guard, you definitely know what the center is doing, maybe a little bigger role. They’ve been in a lot of different personnel groups in between up to the four receivers last week where they started both [Donte] Moncrief, [Hakeem] Nicks, [Reggie] Wayne and [T.Y.] Hilton. Plus, their backs are good receivers. It's really, you have all those personnel groups; you have a lot of elements of three real good pass rush skills, so