Skip to content

Instantly share code, notes, and snippets.

@Tapan
Tapan / nginx
Created February 23, 2017 10:48 — forked from tejasbubane/nginx
nginx logrotate script for centOS. Location: /etc/logrotate.d/nginx. Later change /etc/logrotate.conf add daily and change or comment "rotate" number (preferably comment to keep all log files -> symlinked to /mnt so no space issue)
/opt/nginx/logs/*.log {
daily
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
@Tapan
Tapan / abc
Last active August 29, 2015 14:05
Argument
Net::SSH.start(name, 'user') do |session|
session.exec!('file.rb')
end
file.rb
-----------------
module M1
module M2
class Sport
1. Write a command line program that takes an input string, and returns which
character is consecutively repeated the most times. If multiple characters
repeat the same number of time, return all those characters.
For ex: "aaddddffffaa" will return 'f, d'
For ex: "cat dog ___" will return '_'
SOLUTION :
user_input = gets.chomp