Thursday, November 15, 2012
Tuesday, November 6, 2012
Monday, November 5, 2012
Saturday, October 27, 2012
Wednesday, July 4, 2012
logrotate: rotating logs in multiple directories
logrotate: rotating logs in multiple directories: I've got a server with almost one hundred web-sites. Each of the sites is in its own directory and runs its own logs ...
logrotate.conf:
include /usr/local/etc/logrotate.d
Only one hour later I understood that I can just write a path with multiple meta-characters to include ALL logs in just one line:
/usr/local/www/*/logs/*.log { daily rotate 60 compress notifempty postrotate [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid` endscript }
More than one 'exec' action in 'find' command
More than one 'exec' action in 'find' command: When you run find command, you can pass the names of the found files to an arbitrary command using -exec option: find /tmp -mtime +3 -exe...
find /tmp -mtime +3 -exec rm {} \;
find /tmp -mtime +3 -exec sh -c 'ls -ld "$0"; rm "$0"' {} \;
Saturday, May 19, 2012
Thursday, April 19, 2012
Friday, April 13, 2012
Monday, April 2, 2012
Thursday, March 29, 2012
Wednesday, February 8, 2012
Friday, January 13, 2012
Tuesday, January 3, 2012
Saturday, December 31, 2011
Monday, December 26, 2011
vbscript rfc822 date
Function RFC822(d) ' Date: Mon, 26 Dec 2011 12:58:33 GMT Dim a, b a = Split("Mon,Tue,Wed,Thu,Fri,Sat,Sun", ",") b = Split("Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec", ",") Dim tmp tmp = a(Weekday(d, 2) - 1) & ", " & _ Right("0" & Day(d), 2) & " " & _ b(Month(d) - 1) & " " & _ Year(d) & " " & _ Right("0" & Hour(d), 2) & ":" & _ Right("0" & Minute(d), 2) & ":" & _ Right("0" & Second(d), 2) & " GMT" RFC822 = tmp End Function
' usage: Response.AddHeader "Last-Modified", RFC822(dateadd("h",-1,now))
Sunday, December 25, 2011
Sub fhpx()
Sub fhpx() Dim r As New ServerXMLHTTP60 Dim i, re As New RegExp, m As Match re.Global = True re.Pattern = ".*?" 'Grzegorz Cywicki re.MultiLine = True re.Pattern = " [\s\S]*?" re.Pattern = "\s*?
\s*?(.*?)" For i = 1 To 50 r.Open "GET", "http://500px.com/rg443/following/list?page=" & i r.Open "GET", "http://500px.com/rg443/followers?page=" & i r.send If re.Test(r.responseText) = False Then Exit For For Each m In re.Execute(r.responseText) 'Debug.Print m.Value Debug.Print m.SubMatches(1), m.SubMatches(2), m.SubMatches(0) Next Next End Sub
Wednesday, December 21, 2011
A Networker's Log File: Part 2: Network Redundancy for Windows Server: Dyn...
A Networker's Log File: Part 2: Network Redundancy for Windows Server: Dyn...: Besides NIC teaming in earlier part 1, another way to achieve network redundancy for Windows Server is to employ dynamic IP routing. Window...
A Networker's Log File: Part 3: Configuring RIP routing on Windows Server ...
A Networker's Log File: Part 3: Configuring RIP routing on Windows Server ...: This is following up on part 2 that described the concept of network high availability for single non-clustered Windows server using dynam...
A Networker's Log File: Part 1: Network Redundancy for Windows Servers: NI...
A Networker's Log File: Part 1: Network Redundancy for Windows Servers: NI...: To provide network redundancy to a single Windows server, you would first need to have 2 or more NICs. To protect against a single switch fa...
Thursday, May 26, 2011
Sunday, May 1, 2011
Monday, September 27, 2010
Subscribe to:
Posts (Atom)