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
After the installation of Jenkins and Docker. Add jenkins user to dockergroup (like you did) | |
sudo gpasswd -a jenkins docker | |
Edit the following file | |
vi /usr/lib/systemd/system/docker.service |
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
{ | |
"id": "jenkins", | |
"cmd": "cd jenkins-standalone-master && ./jenkins-standalone.sh -z $(cat /etc/mesos/zk) -r 127.0.0.1:6379", | |
"cpus": 0.5, | |
"mem": 256, | |
"disk": 1024, | |
"instances": 1, | |
"ports": [ | |
0 | |
], |
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
{ | |
"id": "jenkins", | |
"cmd": null, | |
"cpus": 1, | |
"mem": 512, | |
"disk": 1000, | |
"instances": 1, | |
"container": { | |
"docker": { | |
"image": "jenkins", |
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
{ | |
"id": "jenkins", | |
"cmd": "cd jenkins-mesos-deployment-master && ./jenkins-standalone.sh -z $(cat /etc/mesos/zk) -r 10.1.0.18:6379", | |
"cpus": 1, | |
"mem": 1024, | |
"disk": 1024, | |
"instances": 1, | |
"ports": [ | |
0 | |
], |
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
1.9.3-p392 :060 > Address.all | |
Address Load (0.4ms) SELECT "addresses".* FROM "addresses" | |
+----+---------+--------+---------+---------+----------+-------+--------+-------------------------+-------------------------+ | |
| id | user_id | extra | city | country | postcode | state | street | created_at | updated_at | | |
+----+---------+--------+---------+---------+----------+-------+--------+-------------------------+-------------------------+ | |
| 1 | 1 | ankit | asansol | india | 71475 | w.b. | 100 | 2013-06-09 09:22:04 UTC | 2013-06-09 09:22:04 UTC | | |
| 2 | 1 | sanyam | asansol | india | 71476 | w.b. | 101 | 2013-06-09 09:22:05 UTC | 2013-06-09 09:22:05 UTC | | |
| 3 | 2 | abhay | asansol | india | 71476 | w.b. | 102 | 2013-06-09 09:22:05 UTC | 2013-06-09 09:22:05 UTC | | |
| 4 | 3 | abhay | bettiah | india | 71476 | w.b. | 102 | 2013-06-09 09:22:05 UTC | 2013-06-09 09:22:05 UTC | | |
+----+---------+--------+---------+---------+--- |
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 'spec_helper' | |
describe Import do | |
TEST_FILENAME = 'test/fixtures/csv/2XU.txt' | |
ERROR_FILENAME = 'test/fixtures/csv/2XU_errors.txt' | |
before :all do | |
HEADER_ROWS = 2 | |
VARIATION_THEMES = %w(Size Color SizeColor) |
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 User < ActiveRecord::Base | |
attr_accessible :fname, :lname | |
has_many :parents, :dependent => :destroy | |
def self.export_to_csv(filename, model, options = {}) | |
csv_options = {} | |
csv_options[:col_sep] = options[:separator] || ',' | |
header = User.header(model,options = {}) | |
data = User.data(model) |
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
ActiveAdmin.register Bar do | |
# controller.load_and_authorize_resource | |
controller do | |
load_and_authorize_resource :except => [:update, :index, :show, :edit] | |
def scoped_collection | |
end_of_association_chain.accessible_by(current_ability) | |
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
D, [2015-03-19T06:01:53.847340 #8589] [task:296] DEBUG -- : Acquired connection: 44478040 | |
D, [2015-03-19T06:01:53.847695 #8589] [task:296] DEBUG -- : (0.000233s) SELECT * FROM "tasks" WHERE "id" = 296 | |
D, [2015-03-19T06:01:53.848068 #8589] [task:296] DEBUG -- : Released connection: 44478040 | |
D, [2015-03-19T06:01:53.948256 #8589] [task:296] DEBUG -- : Acquired connection: 44478040 | |
D, [2015-03-19T06:01:53.948610 #8589] [task:296] DEBUG -- : (0.000248s) SELECT * FROM "tasks" WHERE "id" = 296 | |
D, [2015-03-19T06:01:53.948964 #8589] [task:296] DEBUG -- : Released connection: 44478040 | |
D, [2015-03-19T06:01:54.049156 #8589] [task:296] DEBUG -- : Acquired connection: 44478040 | |
D, [2015-03-19T06:01:54.049490 #8589] [task:296] DEBUG -- : (0.000230s) SELECT * FROM "tasks" WHERE "id" = 296 | |
D, [2015-03-19T06:01:54.049838 #8589] [task:296] DEBUG -- : Released connection: 44478040 | |
E, [2015-03-19T06:01:54.061176 #8589] [compile_package(memcached/cb508a2dc25a3aeafacddbd43574f300a50101da, bosh-openstack-kvm-ubuntu/2427)] ERROR -- : |
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 facebook | |
if facebook.nil? | |
FbGraph::User.new('me', :access_token => self.fbauth.token).fetch | |
else | |
return facebook | |
end | |
end |
NewerOlder