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
# the script goes through a whole file - apache log file and creates http request log records | |
# handles common and combined log format | |
# can handle duplicates and can handle different log styles | |
# Common Log Format (CLF) - common | |
# "%h %l %u %t \"%r\" %>s %b" | |
# Common Log Format with Virtual Host | |
# "%v %h %l %u %t \"%r\" %>s %b" | |
# NCSA extended/combined log format - combined | |
# "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" |
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
gem 'minitest' | |
gem 'minitest-rails' | |
group :development, :test do | |
# run when something change | |
gem 'guard' | |
gem 'guard-livereload' | |
# gem 'guard-rails_best_practices' | |
gem 'guard-minitest' |
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
salt = SecureRandom.base64 | |
puts "Generated salt: #{salt} (only for information)" | |
passw = '' | |
puts 'Enter password: ' | |
$stdin.noecho do | |
passw = $stdin.gets.strip | |
end | |
if passw.blank? || passw.length < 6 | |
puts 'Password cannot be empty or shorter than 6 characters' | |
exit |
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
# | |
# = Capistrano database.yml task | |
# | |
# Provides a couple of tasks for creating the database.yml | |
# configuration file dynamically when deploy:setup is run. | |
# | |
# Category:: Capistrano | |
# Package:: Database | |
# Author:: Simone Carletti <weppos@weppos.net> | |
# Copyright:: 2007-2010 The Authors |
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
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n | |
# Just to be clear: | |
# Author: Ivan Stana, http://github.com/istana | |
# License: MIT | |
# Base file: devise.en.yml | |
# Some elements taken from https://gist.github.com/MarosPixel/1295185 thx | |
# For versions 2.2, 3.0, maybe other | |
sk: |
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 ruby | |
# -*- coding: UTF-8 -*- | |
# this program should be executed through | |
# rails runner | |
# /usr/bin/time -v ./script/rails runner ../add_locations.rb -y --obce /home/hero/html/OBCE.XLS --ulice /home/hero/html/ULICE.XLS | |
=begin | |
rails new psctest | |
rails g scaffold district name:string code:string | |
rails g scaffold county name:string code:integer district_id:integer shortcuts:text |