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
class User < ActiveRecord::Base | |
def subscribe_mailchimp_list(client = Gibbon.new) | |
if ENV["MAILCHIMP_LIST_ID"] | |
logger.info "add #{self.email} to list #{ENV["MAILCHIMP_LIST_ID"]}" | |
client.list_subscribe(id: ENV["MAILCHIMP_LIST_ID"], | |
email_address: self.email, | |
double_optin: false, | |
send_welcome: false, | |
update_existing: true, | |
merge_vers: {:FNAME => self.first_name, |
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
function save_command_start() { | |
COMMAND_START_TIME=$EPOCHSECONDS | |
} | |
function notify_command_end() { | |
local exit_status=$? | |
local duration=$(( EPOCHSECONDS - COMMAND_START_TIME )) | |
local last_command=$(fc -ln -1 | sed 's/^[ \t]*//') | |
if (( duration >= 30 )); then | |
if [ $exit_status -eq 0 ]; then |
OlderNewer