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
cmd = 'grep @domain.com /var/log/maillog | grep retr= | awk {\'print $6" "$1" "$2" "$3" "$11\'} | grep -v retr=0' | |
output = [] | |
r, io = IO.pipe | |
fork do | |
system(cmd, out: io, err: :out) | |
end | |
io.close | |
list = {} |
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
module MyApp | |
class App < Padrino::Application | |
use ConnectionPoolManagement | |
set :login_model, :user_access | |
register Padrino::Mailer | |
register Padrino::Helpers | |
register Padrino::Sprockets | |
# register Padrino::Cache | |
# register I18n::JS::Middleware | |
# register Padrino::Login |
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
# login as root, and mysql into cphulkd | |
sudo su | |
mysql cphulkd | |
# see blocked / history | |
select user, INET6_NTOA(address) as address1, service, type, logintime, notes, authservice from login_track where INET6_NTOA(address) like ‘%:-ip here-'; | |
select user, INET6_NTOA(address) as address1, service, type, logintime, notes, authservice from login_track order by logintime desc limit 30; | |
select user, INET6_NTOA(address) as address1, service, type, logintime, notes, authservice from login_track where type < 0 order by logintime desc limit 30; |
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
source 'https://rubygems.org' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '~>4.0.3' | |
# Use sqlite3 as the database for Active Record | |
#gem 'sqlite3' | |
gem 'mysql2' | |
# Use SCSS for stylesheets |
NewerOlder