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
# letters in the right order (according to russian phone keyboard) | |
@letters = { ch: 7, f: 7, k: 4, r: 6, sh: 8, softness_mark: 9, v: 2, z: 3 } | |
@backup = @letters | |
@app_path = Dir.pwd | |
def sound *args | |
play *args | |
sleep 0.4 | |
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
delete tel28020130112 from tel28020130112 left outer join ( select min(record_id) as record_id, hash from tel28020130112 group by hash ) as keeprows on tel28020130112.record_id = keeprows.record_id where keeprows.record_id is null; |
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
# lib/extenstions/configuration_extentions.rb | |
module Rails | |
class Application | |
class Configuration | |
def database_configuration | |
require 'erb' | |
case RUBY_PLATFORM.downcase | |
when /darwin/ |
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 | |
# encoding: utf-8 | |
def main | |
o = File.open ARGV[ 1 ], 'w' | |
File.open ARGV[ 0 ], 'r' do |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
#!/usr/bin/env ruby | |
require 'net/http' | |
require 'uri' | |
require 'rubyful_soup' | |
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
delimiter // | |
create procedure `dumpcalls` ( in tbl varchar( 50 ), in agent char( 3 ), in year char( 4 ), in month char( 2 ) ) | |
begin | |
declare done int default false; | |
declare query char( 255 ); | |
declare cur cursor for | |
select | |
concat( 'insert into ', tbl, ' ( select * from billing.', table_name, ' )' ) as table_name | |
from |
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
delimiter // | |
create procedure `eval`( in param text ) | |
begin | |
set @sql = param; | |
prepare stmt from @sql; | |
execute stmt; | |
deallocate prepare stmt; | |
end // |