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 Permission < ActiveRecord::Base | |
serialize :metadata, Hash | |
#bitmask :some_attribute, :as => [:value1, :value2] | |
attr_accessible :action, :role, :subject_class , :metadata | |
rails_admin do | |
configure :block, :metadata | |
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
require 'rails_admin/config/fields/base' | |
module RailsAdmin | |
class Metadata < RailsAdmin::Config::Fields::Base | |
RailsAdmin::Config::Fields::Types::register(self) | |
def value | |
raise 'No metadata!' unless bindings[:object].respond_to?(:metadata) | |
bindings[:object].metadata[method_name] | |
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
root@node-61:~/pool# cat config.json | |
{ | |
"coin": "boolberry", | |
"symbol": "BBR", | |
"logLevel": "debug", | |
"logColors": true, | |
"coinUnits": 1000000000000, |
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
{ | |
"coin": "boolberry", | |
"symbol": "BBR", | |
"logLevel": "debug", | |
"logColors": true, | |
"coinUnits": 1000000000000, |
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
root = "/home/deployer/apps/new-costa/current" | |
#root = "/home/stas/DEV/Projects/SHapovalov/new-costa" | |
#root = "/house" | |
worker_processes 4 | |
working_directory root | |
pid "#{root}/tmp/pids/unicorn.pid" | |
stderr_path "#{root}/log/unicorn.log" | |
stdout_path "#{root}/log/unicorn.log" |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Manage unicorn server | |
# Description: Start, stop, restart unicorn server for a specific application. | |
### END INIT INFO |
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
root@node-61:~/pool# cat config.json | |
{ | |
"coin": "boolberry", | |
"symbol": "BBR", | |
"logLevel": "debug", | |
"logColors": true, | |
"coinUnits": 1000000000000, |
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 bash | |
END=18 | |
for ((i=1;i<=END;i++)); do | |
{ ./simpleminer --pool-addr=79.135.200.61:7777 --login=1FUtZJ9Ao8qg1MiNa6RfRJKY4aFH885wD13Lf6U7xL4FS58f7i6CYL58s8dg2aV8maRzzaQG1c1kCTMDw8LKAEG5LQsW7M8 --pass x; } & done; | |
WAITPIDS="$WAITPIDS "$!;...; wait $WAITPIDS |
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
2014-Jun-04 14:11:28.838139 Read command: transfer 0 21LHPF82QBaEFDWDs8NrgpYq37w5QJcQQQUX1wqDAuAD2QW7oymMj1m3DiC8V6wg7HXYRQyUbihvB4jHzy1S9jzsBjVMK2Q 939913 2106ad3ea279bf34d687b29d530a3229d88edadac48aa5b5f0cf4145555e24a0 | |
2014-Jun-04 14:12:18.381944 Read command: transfer 0 21LHPF82QBaEFDWDs8NrgpYq37w5QJcQQQUX1wqDAuAD2QW7oymMj1m3DiC8V6wg7HXYRQyUbihvB4jHzy1S9jzsBjVMK2Q 100000 2106ad3ea279bf34d687b29d530a3229d88edadac48aa5b5f0cf4145555e24a0 | |
2014-Jun-04 14:12:53.177725 Read command: transfer 0 21LHPF82QBaEFDWDs8NrgpYq37w5QJcQQQUX1wqDAuAD2QW7oymMj1m3DiC8V6wg7HXYRQyUbihvB4jHzy1S9jzsBjVMK2Q 70000 2106ad3ea279bf34d687b29d530a3229d88edadac48aa5b5f0cf4145555e24a0 | |
2014-Jun-04 14:13:04.406816 Read command: transfer 0 21LHPF82QBaEFDWDs8NrgpYq37w5QJcQQQUX1wqDAuAD2QW7oymMj1m3DiC8V6wg7HXYRQyUbihvB4jHzy1S9jzsBjVMK2Q 70000 2106ad3ea279bf34d687b29d530a3229d88edadac48aa5b5f0cf4145555e24a0 | |
2014-Jun-04 14:13:06.038349 Read command: transfer 0 21LHPF82QBaEFDWDs8NrgpYq37w5QJcQQQUX1wqDAuAD2QW7oymMj1m3DiC8V6wg7HXYRQyUbihvB4jHzy1S9jz |
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 ApplicationController < ActionController::Base | |
before_filter :authenticate | |
protect_from_forgery with: :exception | |
protected | |
def authenticate | |
authenticate_or_request_with_http_basic do |username, password| | |
username == "user" && password == "password" |