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
| <style> | |
| h1, a, p { | |
| color:#fff; | |
| margin-top:0; | |
| padding-top:0; | |
| } | |
| </style> | |
| <div style="padding:20px;background:orange"> | |
| <h1>Call Us Today! |
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
| /* | |
| panoply.io send data about phone calls, text messages, web forms and more to panoply.io. | |
| USAGE: | |
| Step 1: | |
| Add to https://app.calltrackingmetrics.com/lambdas/new | |
| Name your function panoply.io | |
| Step 2: |
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
| if ENV['REDIS_ACCESS_MODE'] == 'readonly' | |
| class Redis | |
| class Client | |
| WRITE_COMMANDS = ::Rails.cache.data.command.map { |a| a[0] if a[2].include?('write') }.compact.to_set.freeze | |
| def process(commands) | |
| if commands.flatten.any? { |c| WRITE_COMMANDS.include?(c.to_s) } | |
| raise NotImplementedError, "REDIS_ACCESS_MODE is set to 'readonly', disallowing writes" | |
| 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
| # config/initializers/redis.rb | |
| require 'redis' | |
| # Disables the `flushdb` and `flushall` commands. | |
| class Redis | |
| module DangerousCommands | |
| def flushdb | |
| raise 'This is EXTREMELY DANGEROUS! If you really want to EMPTY THE ENTIRE DATABASE, do it from `redis-cli`.' | |
| # You could call `super` here if you want to allow access in some circumstances. | |
| 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
| # Put this function to your .bashrc file. | |
| # Usage: mv oldfilename | |
| # If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
| # Original mv is called when it's called with more than one argument. | |
| # It's useful when you want to change just a few letters in a long name. | |
| # | |
| # Also see: | |
| # - imv from renameutils | |
| # - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
OlderNewer