This file contains hidden or 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
| pbpaster | cut -d: -f 1 | awk '{printf "\"%s\",\n",$1}' |
This file contains hidden or 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
| import socket | |
| import datetime | |
| sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| sock.connect(('127.0.0.1', 2003)) | |
| now = datetime.datetime.now() | |
| onehour = datetime.timedelta(days=1) | |
| h = now - onehour | |
| minute = datetime.timedelta(minutes=1) |
This file contains hidden or 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
| def readfilerev(fd): | |
| buff = 256 | |
| fd.seek(0,2) | |
| size = fd.tell() | |
| rem = size % buff | |
| #pos = max(0, (size / buff -1) * buff) | |
| line = '' | |
| pos = -1 | |
| while fd.tell() > 0: | |
| fd.seek(pos, 1) |
This file contains hidden or 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
| import re | |
| import sys | |
| import os | |
| def filerev(somefile, buffer=256): | |
| somefile.seek(0, os.SEEK_END) | |
| size = somefile.tell() | |
| lines = [''] | |
| rem = size % buffer | |
| pos = max(0, (size // buffer - 1) * buffer) |
This file contains hidden or 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
| import sys | |
| def readfilerev(fd): | |
| buff = 256 | |
| fd.seek(0,2) | |
| size = fd.tell() | |
| rem = size % buff | |
| pos = max(0, size - (buff + rem)) | |
| line = '' | |
| while pos >= 0 : | |
| fd.seek(pos, 0) |
This file contains hidden or 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
| import sys | |
| import os | |
| import urllib | |
| import urllib2 | |
| import tarfile | |
| import shutil | |
| APP_NAME="wordpress" |
This file contains hidden or 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
| input { | |
| file { | |
| path => "/var/log/messages" | |
| type => "syslog" | |
| } | |
| file { | |
| path => "/var/log/php_errors.log" | |
| type => "phperror" | |
| } | |
| file { |
This file contains hidden or 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
| { | |
| graphitePort: 2003 | |
| , graphiteHost: "localhost" | |
| , port: 8125 | |
| , backends: [ "./backends/graphite" ] | |
| } |
This file contains hidden or 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_TS %{MONTHDAY}[/-]%{MONTH}[/-]%{YEAR} %{TIME} | |
| PHP_LOG \[%{PHP_TS:timestamp}\]( PHP %{LOGLEVEL:level}:)? %{GREEDYDATA:message} |
This file contains hidden or 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
| import random | |
| import string | |
| smailar_chars = '01oilLIOpP' | |
| upper = "".join(set(string.uppercase) - set(smailar_chars)) | |
| lower = "".join(set(string.lowercase) - set(smailar_chars)) | |
| chars = upper + lower | |
| numbers = '23456789' | |
| symbols = '#$%&+,-./:;_~?=@!' |
OlderNewer