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
-- Create a group | |
CREATE ROLE readaccess; | |
-- Grant access to existing tables | |
GRANT CONNECT ON DATABASE _database_name_ TO readaccess; | |
GRANT USAGE ON SCHEMA public TO readaccess; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO readaccess; | |
-- Grant access to future tables |
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
#!/usr/bin/env bash | |
# Simple move this file into your Rails `script` folder. Also make sure you `chmod +x puma.sh`. | |
# Please modify the CONSTANT variables to fit your configurations. | |
# The script will start with config set by $PUMA_CONFIG_FILE by default | |
PUMA_CONFIG_FILE=config/puma.rb | |
PUMA_PID_FILE=tmp/pids/puma.pid | |
PUMA_SOCKET=tmp/sockets/puma.sock |
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 Document < ActiveRecord::Base | |
belongs_to :parent, class_name: 'Document' | |
def self.get_ancestors(who) | |
@tree ||= [] | |
# @tree is instance variable of Document class object not document instance object | |
# so: Document.get_instance_variable('@tree') | |
if who.parent.nil? |
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
mkdir ~/tmp_working_dir | |
cd ~/tmp_working_dir | |
git init full_smalte | |
cd full_smalte | |
all_subs="installer framework module.sample tests theme.backoffice.default theme.frontoffice.default" | |
# part 1 : import all | |
# Six branch doomed to die |