Skip to content

Instantly share code, notes, and snippets.

View matthewcrist's full-sized avatar

Matthew Crist matthewcrist

View GitHub Profile
/summon WitherBoss ~0 ~1 ~0 {Equipment:[{id:diamond_sword,tag:{Unbreakable:1,ench:[{id:18,lvl:5},{id:20,lvl:2},{id:19,lvl:2},{id:21,lvl:3},{id:16,lvl:5},{id:17,lvl:5},{id:34,lvl:3}]}},{id:diamond_boots,tag:{Unbreakable:1,ench:[{id:3,lvl:4},{id:8,lvl:3},{id:2,lvl:4},{id:1,lvl:4},{id:4,lvl:4},{id:0,lvl:4},{id:7,lvl:3},{id:34,lvl:3}]}},{id:diamond_leggings,tag:{ench:[{id:3,lvl:4},{id:1,lvl:4},{id:4,lvl:4},{id:0,lvl:4},{id:7,lvl:3},{id:34,lvl:3}]}},{id:diamond_chestplate,tag:{Unbreakable:1,ench:[{id:3,lvl:4},{id:1,lvl:4},{id:4,lvl:4},{id:0,lvl:4},{id:7,lvl:3},{id:34,lvl:3}]}},{id:diamond_helmet,tag:{Unbreakable:1,ench:[{id:6,lvl:1},{id:3,lvl:4},{id:1,lvl:4},{id:4,lvl:4},{id:0,lvl:4},{id:5,lvl:3},{id:7,lvl:3},{id:34,lvl:3}]}}],CustomName:Wither Storm,CustomNameVisible:1,Attributes:[{Name:generic.maxHealth,Base:500},{Name:generic.movementSpeed,Base:1.0},{Name:generic.attackDamage,Base:10},{Name:generic.knockbackResistance,Base:500}],ActiveEffects:[{Id:22,Amplifier:1,Duration:999999},{Id:12,Amplifier:1,Duration:9999
@matthewcrist
matthewcrist / readme.md
Created September 21, 2016 14:14
Auto height iFrames on Boston.gov

iFrames that resize based on the content of the page is possible for Boston.gov. In order to get them working, you will need to include a snippet of JS on the page that will be iframed. The code for this is:

<script>
    window.iFrameResizer = {
    targetOrigin: 'https://www.boston.gov'
  }
</script>
<script src="https://www.boston.gov/sites/all/themes/custom/boston_public/dist/js/resizer.client.js"></script>
@matthewcrist
matthewcrist / ssl_puma.sh
Last active January 28, 2016 00:00 — forked from tadast/ssl_puma.sh
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 4096
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@matthewcrist
matthewcrist / 0_reuse_code.js
Last active August 29, 2015 14:25
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
@matthewcrist
matthewcrist / mongoid_active_model_initializer.rb
Created December 26, 2013 19:31
ActiveModel serializer with Mongoid
# config/initializers/mongoid_active_model_initializer.rb
Mongoid::Document.send(:include, ActiveModel::SerializerSupport)
Mongoid::Criteria.delegate(:active_model_serializer, to: :to_a)
@matthewcrist
matthewcrist / gist:6187527
Created August 8, 2013 18:50
Symbolset Oops
Puma caught this error: Paypal::Exception::APIError
/home/deploy/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/paypal-express-0.5.3/lib/paypal/nvp/request.rb:57:in `handle_response'
/home/deploy/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/paypal-express-0.5.3/lib/paypal/nvp/request.rb:37:in `request'
/home/deploy/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/paypal-express-0.5.3/lib/paypal/express/request.rb:50:in `checkout!'
/home/deploy/symbolset/current/app/helpers.rb:266:in `paypal'
/home/deploy/symbolset/current/app/controllers.rb:200:in `post'
<main>:32:in `block in service'
<main>:32:in `catch'
<main>:32:in `service'
<main>:47:in `call'
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
@matthewcrist
matthewcrist / Stack trace
Created May 8, 2013 01:22
I was getting an error locally that I wasn't seeing on Heroku with Rails 4.0.0.rc1. Turns out, it was the gems for heroku that were causing the issue. Moving them to the production group in my Gemfile fixed it.
127.0.0.1 - - [07/May/2013 21:16:05] "GET / HTTP/1.1" 500 9297 0.1820
I, [2013-05-07T21:16:06.773109 #1714] INFO -- : Started GET "/" for 127.0.0.1 at 2013-05-07 21:16:06 -0400
F, [2013-05-07T21:16:06.811554 #1714] FATAL -- :
ArgumentError (wrong number of arguments (0 for 1)):
activesupport (4.0.0.rc1) lib/active_support/core_ext/kernel/reporting.rb:82:in `capture'
activerecord (4.0.0.rc1) lib/active_record/migration.rb:363:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.0.0.rc1) lib/active_support/callbacks.rb:392:in `_run__2942527772805940719__call__callbacks'
activesupport (4.0.0.rc1) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'