Skip to content

Instantly share code, notes, and snippets.

class Rack::Attack
# starting with the example configuration
### Configure Cache ###
# If you don't want to use Rails.cache (Rack::Attack's default), then
# configure it here.
#
# Note: The store is only used for throttling (not blocklisting and
# safelisting). It must implement .increment and .write like
@cnorm35
cnorm35 / stimulus.md
Created April 7, 2021 16:32 — forked from mrmartineau/stimulus.md
Stimulus cheatsheet

Keybase proof

I hereby claim:

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am cnorm35 on github.
  • I am codes_norms (https://keybase.io/codes_norms) on keybase.
  • I have a public key ASCO4Pd2EH00Wsq_Km_uadvpqBpRn9R3k1-Cn6bnXElU-Qo

To claim this, I am signing this object:

@cnorm35
cnorm35 / oop.txt
Last active May 18, 2017 21:11
Javascript OOP Exercise
Create an new, empty class for a Dog or Cat.
Then create new classes for specific breeds of that animal (German Shepard, Yorkie, Tabby, Maine Coon, etc.).
Fill these classes with information you think would be useful and at least 1 method.
Look for places where there is duplication and try to move it to the Cat or Dog prototype.
(hint: it's ok to start with an empty prototype and add items to the prototype )
def source_paths
Array(super)
[File.expand_path(File.dirname(__FILE__))]
end
#Here we are removing the Gemfile and starting over
#You may want to tap and existing gemset or go this method to make it easier for
#others to check it out.
#Plus, you dont have to remove the comments in the Gemfile
@cnorm35
cnorm35 / polymorphic_users_post_template.rb
Last active June 2, 2016 12:13
Template for starting point for blog post
def source_paths
Array(super)
[File.expand_path(File.dirname(__FILE__))]
end
#Here we are removing the Gemfile and starting over
#You may want to tap and existing gemset or go this method to make it easier for
#others to check it out.
#Plus, you dont have to remove the comments in the Gemfile

Keybase proof

I hereby claim:

  • I am cnorm35 on github.
  • I am codes (https://keybase.io/codes) on keybase.
  • I have a public key whose fingerprint is 9388 835A AE7E 28AF 8A2D 41D1 A844 292A 658F FCC2

To claim this, I am signing this object:

require 'twitter'
#HitchBotsGhost keys
client = Twitter::REST::Client.new do |config|
config.consumer_key = ENV[TWT_CONSUMER_KEY]
config.consumer_secret = ENV[TWT_CONSUMER_SECRET]
config.access_token = ENV[ACCESS_TOKEN]
config.access_token_secret = ENV[ACCESS_TOKEN_SECRET]
end