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 'benchmark/ips' | |
require 'ohm' | |
require 'dm-core' | |
require 'dm-redis-adapter' | |
Ohm.redis = Redic.new("redis://127.0.0.1:6379") | |
DataMapper.setup(:default, {:adapter => "redis"}) | |
class DMUser | |
include DataMapper::Resource |
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
-- activity.sql | |
select procpid, query_start, current_query from pg_stat_activity WHERE current_query <> '<IDLE>' order by query_start | |
-- cancel.sql | |
select pg_cancel_backend(procpid) | |
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
<?php | |
/* | |
* Title: vhost.php | |
* Create_date: 2011.02.23 | |
* Author: Abstraindo Team | |
* Version: 0.1 | |
* Desc: Script para auto inserção de virtual host do Apache, | |
* adição de regra no arquivo host e envio de e-mail para os | |
* interessados. | |
* HowToUse: execute sudo php vhost.php $endereçoVhost $pathProject |