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
- rvm | |
- rvm install 1.9.2-head | |
- rmv create gemset 1.9.2-head@r3 | |
- rmv use above | |
- gem install rails3b | |
- gem install rails --pre | |
- gem install sqlite3 | |
- gem install haml | |
- gem install rspec --pre | |
- gem install rspec-rails --pre |
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
# ******************************************************************************************* | |
# Collected and assembled from various sources - thanks to all OS providers | |
# | |
# call> rails new my_app -J -T -m 'this template' | |
# ******************************************************************************************* | |
rvmrc = <<-RVMRC | |
rvm_gemset_create_on_use_flag=1 | |
rvm gemset use 1.9.2-pre@#{app_name} | |
RVMRC |
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
namespace :oracle do | |
desc "Grant SELECT to ROLE 'SDD_READ' on all table and views in the schema rerefenced by RAILS_ENV" | |
task :grant_selects => :environment do | |
# Define Role (or User) to be granted | |
RoleToGrant = "your_role_or_user" | |
begin | |
db_objects = ActiveRecord::Base.connection.send(:select, "select object_name, object_type from user_objects where object_type in ('VIEW', 'TABLE')") |
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/python | |
import socket | |
import struct | |
import sys | |
import os | |
import os.path | |
import time | |
# see com.intelij.idea.SocketLock for the server side of this interface |
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 'pp' | |
puts "Seeding for env '#{Rails.env}'" | |
# disable AR logger | |
old_logger = ActiveRecord::Base.logger | |
ActiveRecord::Base.logger = nil unless $VERBOSE | |
env_seed_file = "#{Rails.root}/db/seeds/#{Rails.env.downcase}/seeds.rb" | |
# first load yaml files that is "base" loading |
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
# encoding: utf-8 | |
require 'active_support/basic_object' | |
require 'active_support/core_ext/array/conversions' | |
require 'active_support/core_ext/object/acts_like' | |
class Date | |
def workday? | |
workdays = ::I18n.t!('definitions.workday.days', :default => (1..5)) | |
none_workdays = ::I18n.t!('definitions.workday.public_holidays', :default => [[]]) # Returns first elememnt within array if translatio is missing (I18n principle) |
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
# ************************************************************************************************ | |
# *** Mergin with ghostscript | |
# ************************************************************************************************ | |
GhostScript = `which gs`.chomp | |
dir = Rails.root.join('tmp').to_s | |
file_names = [ | |
'2013_01_24_Pfandhalterschaft_DE.pdf', | |
'2013_01_24_Passivitaetserklaerung_DE.pdf', |
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 PropertyStruct | |
def initialize(nil_safe = true) | |
@nil_safe = !!nil_safe | |
@data = {} | |
end | |
def [](attribute) | |
result = @data |
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
docker ps | |
# running docker container | |
docker stop <contaienrId> | |
# stop the container | |
docker images | |
# list all installed images | |
# Start containers ========================================== | |
# REDIS | |
docker run -it --rm -p 6379:6379 -d --name redis redis:alpine |
OlderNewer