Skip to content

Instantly share code, notes, and snippets.

View muffinista's full-sized avatar

Colin Mitchell muffinista

View GitHub Profile
@muffinista
muffinista / patch.diff
Created April 4, 2019 02:15
anti-spam measures for mastodon
diff --git a/Gemfile b/Gemfile
index 8266488f8..ce47aa6e2 100644
--- a/Gemfile
+++ b/Gemfile
@@ -147,3 +147,6 @@ group :production do
end
gem 'concurrent-ruby', require: false
+
+gem 'ipcat'
Date,What,Amount,Notes
9/3/2018,AWS,$17.06,
9/1/2018,Digital Ocean,$26.28,
8/3/2018,AWS,$13.01,
8/1/2018,Digital Ocean,$27.34,
7/3/2018,AWS,$9.36,
7/1/2018,Digital Ocean,$27.34,
6/3/2018,AWS,$8.56,
6/1/2018,Digital Ocean,$27.34,
5/3/2018,AWS,$7.15,
@muffinista
muffinista / swagger.json
Created August 28, 2018 18:51
mastodon swagger example
{
"basePath": "/api",
"consumes": [
"application/json"
],
"definitions": {
"Status": {
"properties": {
"id": {
"format": "int64",
#
# java -jar ./swagger-codegen-cli.jar generate -l ruby -i docs/http-api/swagger/authoritative-api-swagger.yaml -o /tmp/foo
#
[main] INFO io.swagger.parser.Swagger20Parser - reading from docs/http-api/swagger/authoritative-api-swagger.yaml
[main] INFO io.swagger.parser.Swagger20Parser - reading from docs/http-api/swagger/authoritative-api-swagger.yaml
[main] WARN io.swagger.util.PropertyDeserializer - no property from null, null, {ENUM=null, TITLE=null, DESCRIPTION=null, DEFAULT=null, PATTERN=null, DESCRIMINATOR=null, MIN_ITEMS=null, MAX_ITEMS=null, MIN_PROPERTIES=null, MAX_PROPERTIES=null, MIN_LENGTH=null, MAX_LENGTH=null, MINIMUM=null, MAXIMUM=null, EXCLUSIVE_MINIMUM=null, EXCLUSIVE_MAXIMUM=null, UNIQUE_ITEMS=null, EXAMPLE=null, TYPE=null, FORMAT=null, READ_ONLY=null, VENDOR_EXTENSIONS={}, MULTIPLE_OF=null}[main] WARN io.swagger.util.PropertyDeserializer - no property from null, null, {ENUM=null, TITLE=null, DESCRIPTION=null, DEFAULT=null, PATTERN=null, DESCRIMINATOR=null, MIN_ITEMS=null, MAX_ITEMS=null,
source 'https://rubygems.org'
gem "chatterbot", :git => "https://github.com/muffinista/chatterbot.git"
@muffinista
muffinista / loveletters.rb
Created April 4, 2017 17:41
ruby version of LOVELETTERS
#!/usr/bin/env ruby
#
# this code is modified from
#
# https://github.com/gingerbeardman/loveletter
#
# any mistakes are certainly added from me
#
<!DOCTYPE html>
<html>
<head>
<title>Screen Flipper</title>
<script>
// this little javascript snippet will parse any incoming URL
// parameters and place them in the window.urlParams object
window.urlParams = window.location.search.split(/[?&]/).slice(1).map(function(paramPair) {
return paramPair.split(/=(.+)?/).slice(0, 2);
}).reduce(function (obj, pairArray) {
We can't make this file beautiful and searchable because it's too large.
aries Good vibes in the air will help make today's Full Moon pleasant. You feel genuinely sympathetic and sensitive to the needs of partners and close friends. Gosh, golly, gee!
taurus Today, the only Full Moon in your sign all year takes place. Fortunately for you, other planetary aspects nicely smooth everything over. (Looking good!)
gemini This is an interesting day for love affairs, romance and sweet flirtations. Similarly, the arts and sports also are pleasantly blessed. Enjoy good times with children.
cancer Even though there is some tension with today's Full Moon, it's still a very pleasant day with family members. People are gentle and kind to each other.
leo Your communications with siblings and relatives are particularly warm and caring today because you appreciate where the other person is coming from and what he or she is going through. This is a good thing.
virgo You might be tempted to spend too much money on elegance and luxury today. Just keep this in mind. Don't be rash with your hard-earned
gem uninstall oauth
gem install oauth --version="0.4.7"
Processing global_page_title_color.page_title (color) from page_title_color > global_page_title_color.page_title
Assinging 'ffffff' to value
Processing feature_titles.feature_title_background (rgba) from subheader_background.color > feature_titles.feature_title_background
Assinging 'rgba(255, 255, 255, 1.0)' to value
Processing global_page_title_font.page_title (font_face) from header_font_id > global_page_title_font(_legacy).page_title
Assinging '12528' to value
Processing feature_titles.feature_title (background_image) from subheader_background.image > feature_titles.feature_title.background_image
Assinging '5168626' to value
Processing global_page_title_font.page_title_size (number) from header_font_size > global_page_title_font(_legacy).page_title_size
Assinging '46' to value