This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
def roll_once | |
4.times.map { rand(1..6) }.sort.drop(1).reduce(:+) | |
end | |
def roll(rolls=1) | |
rolls.times.map { roll_once } | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'twitter_ebooks' | |
include Ebooks | |
CONSUMER_KEY = "" | |
CONSUMER_SECRET = "" | |
OATH_TOKEN = "" # oauth token for ebooks account | |
OAUTH_TOKEN_SECRET = "" # oauth secret for ebooks account | |
TWITTER_USERNAME = "PornyPira_Bot" # Ebooks account username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some notes to the character sheet! | |
Initiative: Dex Bonus (4) | |
Attack Bonus (for weapons): Inspiration + Dex bonus (6) | |
Damage Bonus (for weaspons): Dex bonus (4) | |
Encumberance (weight limit before you lose 5m speed): 30lbs | |
Total Weight (currently): 50 lbs | |
SO! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'twitter_ebooks' | |
require 'set' | |
include Ebooks | |
CONSUMER_KEY = "" | |
CONSUMER_SECRET = "" | |
OATH_TOKEN = "" # oauth token for ebooks account | |
OAUTH_TOKEN_SECRET = "" # oauth secret for ebooks account |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'twitter_ebooks' | |
include Ebooks | |
CONSUMER_KEY = "" | |
CONSUMER_SECRET = "" | |
OATH_TOKEN = "" # oauth token for ebooks account | |
OAUTH_TOKEN_SECRET = "" # oauth secret for ebooks account | |
ROBOT_ID = "book" # Avoid infinite reply chains |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## pulling a specific line | |
if tweet.text.start_with?('Q') | |
q_reply = File.readlines("file.txt") | |
reply(tweet, q_reply[0]) | |
else | |
reply(tweet, model.make_response(meta(tweet).mentionless, meta(tweet).limit)) | |
end | |
## pulling a random line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
set :public_folder,File.dirname(__FILE__) + '/public' | |
run Sinatra::Application | |
get '/' do | |
send_file 'public/index.html' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
├── Gemfile | |
├── Gemfile.lock | |
├── Procfile | |
├── README.md | |
├── composer.json | |
├── config.ru | |
└── public | |
├── articles.html | |
├── bootstrap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### | |
# | |
# PyGlow | |
# | |
##### | |
# | |
# Python module to control Pimoronis PiGlow | |
# [http://shop.pimoroni.com/products/piglow] | |
# | |
# * based on cpu percentage utilisation indicator by Jason (@Boeeerb) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Adafruit_NeoPixel.h> | |
#define PIN 0 | |
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(32, PIN); | |
// Change These Variables | |
int maxBrightness = 70; | |
int minBrightness = 0; | |
int fadeSpeed = 25; |
OlderNewer