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
require 'mail' | |
require 'action_mailer/tmail_compat' | |
require 'action_mailer/collector' | |
require 'active_support/core_ext/array/wrap' | |
require 'active_support/core_ext/object/blank' | |
require 'active_support/core_ext/proc' | |
require 'active_support/core_ext/string/inflections' | |
require 'action_mailer/log_subscriber' | |
module ActionMailer #:nodoc: |
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
source 'http://rubygems.org/' | |
gem 'unicorn' | |
# group :app do | |
gem 'ruby-odbc', '0.99995' | |
gem 'sinatra' | |
#gem "sinatra-activerecord" | |
gem 'sinatra-contrib' | |
gem 'activerecord', '3.2.13' |
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
developer@ubuntu:~$ ifconfig | |
eth0 Link encap:Ethernet HWaddr 00:0c:29:54:3d:be | |
inet addr:192.168.21.128 Bcast:192.168.21.255 Mask:255.255.255.0 | |
inet6 addr: fe80::20c:29ff:fe54:3dbe/64 Scope:Link | |
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 | |
RX packets:169 errors:0 dropped:0 overruns:0 frame:0 | |
TX packets:367 errors:0 dropped:0 overruns:0 carrier:0 | |
collisions:0 txqueuelen:1000 | |
RX bytes:22809 (22.8 KB) TX bytes:53298 (53.2 KB) | |
Interrupt:19 Base address:0x2000 |
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 Ability | |
include CanCan::Ability | |
def initialize(user) | |
# Define abilities for the passed in user here. For example: | |
# | |
# user ||= User.new # guest user (not logged in) | |
# if user.admin? | |
# can :manage, :all | |
# else |
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 Template < ActiveRecord::Base | |
belongs_to :company | |
belongs_to :template_category | |
belongs_to :user | |
validates :name, :subject, :body, :company, :template_category, :user, presence: true | |
validate :recommended_only_admin_user, :template_category_same_company, :user_same_company | |
private |
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 ChangeRecommendedDefaultOfTemplates < ActiveRecord::Migration | |
def change | |
change_column_null :templates, :recommended, false, default: false | |
end | |
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
FactoryGirl.define do | |
factory :flow do | |
name "MyString" | |
daily_send nil | |
send_on_weekends false | |
actions [{'when': 'now', 'order': '1', 'template_id': '1234'}] | |
recipients [{'contact_id': '1234'}, | |
{'first_name': 'Test', 'last_name': 'Last','email': 'user@test.com', 'business': 'Testing'}] | |
company | |
user { build :user, company: company } |
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
#0 0x00007fff00000001 in ?? () | |
#1 0x0000000000401434 in http_parser_execute (parser=0x609030, settings=0x7fffffffdc20, | |
data=0x7ffffffe4c10 "HTTP/1.1 200 OK\r\nContent-Type: application/json\r\nServer: Docker/1.10.2 (linux)\r\nDate: Mon, 07 Nov 2016 14:11:49 GMT\r\nTransfer-Encoding: chunked\r\n\r\n", len=147) at http_parser.c:777 | |
#2 0x0000000000400b1a in main (argc=1, argv=0x7fffffffde18) at testhttp.c:77 |
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
- name: start service | |
service: name={{service_name}} state=started | |
when: service_status.stat.exists | |
register: start_result | |
tags: | |
- start | |
- name: update systemd files | |
shell: systemctl daemon-reload | |
when: start_result.failed and 'systemctl daemon-reload' in start_result.msg |
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
reply = redisCommand(redis_conn, "SETEX inspect:%s %d %b", container_id, 60*2, inspect_result, | |
strlen(inspect_result)); | |
// freeReplyObject(reply); | |
if (redisGetReply(redis_conn, reply)==REDIS_OK) { | |
logger_log("transmit_container_inspect joined\n"); | |
freeReplyObject(reply); | |
} else { | |
logger_log("transmit_container_inspect redis error %d\n", __LINE__); | |
return -1; | |
} |
OlderNewer