ctrl+shit+m
pratique pour tester le responsive d'un site!
-
https://links.infomee.fr/?JFLpKQUn client irc en command line orienté bot, très simple à mettre en place : ii
-
http://www.rogdham.net/2013/04/07/git-irc-bot-in-5-minutes.enAide à comprendre pas mal de chose concernant graphite/statsd
-
https://github.com/etsy/statsd/blob/master/docs/graphite.mdSuite d'outils bien pratique pour tester/vérifier/debug ses whisper files, en particulier whisper-dump et whisper-fetch
-
https://github.com/graphite-project/whisper10 fois plus rapide! J'ai du mal à y croire..
-
http://www.networkworld.com/article/2459286/why-tcp/why-tcp/ip-is-on-the-way-out.html#tk.rss_allUn candidat pour remplacer abp/abe ghostery ?
-
https://www.eff.org/privacybadgerPetite révision du vocabulaire, ça fait pas de mal ;)
-
http://fr.wikipedia.org/wiki/Domaine_de_diffusion<?php
$extensions = get_loaded_extensions();
foreach($extensions as $ext) {
echo "$ext --> ";
echo phpversion($ext);
echo "\n";
}
-
https://links.infomee.fr/?vo6lAQOk.. Les gratuitois reply servent à mettre à jour pro-activement les tables arp des petits voisins..
This can be caused by devices that perform an unsolicited, or Gratuitous ARP replies.
Load balancers, High Availbility pairs (dual NICs in a host, dual firewalls, etc) will send a broad cast ARP reply to update everyones ARP table so that know what MAC to send frames for the shared IP address.
On peut aussi se servir de request pour faire ça en demandant qui a notre propre IP (http://infomee.fr/vrac/files/index.php?f=54ad62c46482e)
Pour rappel les gratuitous sont des paquet arp "gratuit" qu'on forge en prévention.
Les "gratuitous" request servent à vérifier que l'ip qu'on veut utiliser n'est pas prise (si pas de réponse).
-
https://supportforums.cisco.com/discussion/10941681/arp-reply-broadcast:o je connaissais pas.. C'est super bien ce truc, thx arnaudb!
ctrl+shift+e
-
https://links.infomee.fr/?DOGGaQapt-get install debhelper devscripts
git clone https://github.com/etsy/statsd.git
cd statsd
dpkg-buildpackage
dpkg -i ../<deb file>
-
https://github.com/etsy/statsd/issues/161def archive_to_bytes(archive):
def to_seconds(s):
SECONDS_IN_A = {
's': 1,
'm': 1 60,
'h': 1 60 60,
'd': 1 60 60 24,
'y': 1 60 60 24 365,
}
return int(s[:-1]) * SECONDS_IN_A[s[-1]]
archive = [map(to_seconds, point.split(':'))
for point in args.archive.split(',')]
SIZE_METADATA = 2 * 4 + 4 + 4 # 16 [!2LfL]
SIZE_ARCHIVE_INFO = 3 * 4 # 12 [!3L]+
SIZE_POINT = 4 + 8 # 12 [!Ld]+
size = 0
for resolution, retention in archive:
size += SIZE_ARCHIVE_INFO + SIZE_POINT * retention/resolution
if size:
size += SIZE_METADATA
return size
if name == 'main':
import argparse
parser = argparse.ArgumentParser(
description="Calculates the size of the whisper storage for the given \
archive (in resolution:retention format, e.g. 1m:24h,5m:3m)"
)
parser.add_argument(
'archive',
help="Archive in storage-schemas.conf format (resolution:retention)"
)
args = parser.parse_args()
print "{} >> {} bytes".format(args.archive, archive_to_bytes(args.archive))
-
https://gist.github.com/jjmaestro/5774063#file-whisper-calculator-pyimport os
import mmap
import struct
import signal
import optparse
try:
import whisper
except ImportError:
raise SystemExit('[ERROR] Please make sure whisper is installed properly')
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
option_parser = optparse.OptionParser(usage='''%prog path''')
(options, args) = option_parser.parse_args()
if len(args) != 1:
option_parser.error("require one input file name")
else:
path = args[0]
def mmap_file(filename):
fd = os.open(filename, os.O_RDONLY)
map = mmap.mmap(fd, os.fstat(fd).st_size, prot=mmap.PROT_READ)
os.close(fd)
return map
def read_header(map):
try:
(aggregationType,maxRetention,xFilesFactor,archiveCount) = struct.unpack(whisper.metadataFormat,map[:whisper.metadataSize])
except:
raise CorruptWhisperFile("Unable to unpack header")
archives = []
archiveOffset = whisper.metadataSize
for i in xrange(archiveCount):
try:
(offset, secondsPerPoint, points) = struct.unpack(whisper.archiveInfoFormat, map[archiveOffset:archiveOffset+whisper.archiveInfoSize])
except:
raise CorruptWhisperFile("Unable to read archive %d metadata" % i)
archiveInfo = {
'offset' : offset,
'secondsPerPoint' : secondsPerPoint,
'points' : points,
'retention' : secondsPerPoint * points,
'size' : points * whisper.pointSize,
}
archives.append(archiveInfo)
archiveOffset += whisper.archiveInfoSize
header = {
'aggregationMethod' : whisper.aggregationTypeToMethod.get(aggregationType, 'average'),
'maxRetention' : maxRetention,
'xFilesFactor' : xFilesFactor,
'archives' : archives,
}
return header
def dump_header(header):
print 'Meta data:'
print ' aggregation method: %s' % header['aggregationMethod']
print ' max retention: %d' % header['maxRetention']
print ' xFilesFactor: %g' % header['xFilesFactor']
print
dump_archive_headers(header['archives'])
def dump_archive_headers(archives):
for i,archive in enumerate(archives):
print 'Archive %d info:' % i
print ' offset: %d' % archive['offset']
print ' seconds per point: %d' % archive['secondsPerPoint']
print ' points: %d' % archive['points']
print ' retention: %d' % archive['retention']
print ' size: %d' % archive['size']
print
def dump_archives(archives):
for i,archive in enumerate(archives):
print 'Archive %d data:' %i
offset = archive['offset']
for point in xrange(archive['points']):
(timestamp, value) = struct.unpack(whisper.pointFormat, map[offset:offset+whisper.pointSize])
print '%d: %d, %10.35g' % (point, timestamp, value)
offset += whisper.pointSize
print
if not os.path.exists(path):
raise SystemExit('[ERROR] File "%s" does not exist!' % path)
map = mmap_file(path)
header = read_header(map)
dump_header(header)
dump_archives(header['archives'])
-
http://bazaar.launchpad.net/~amos-shapira/graphite/whisper-dump/revision/733#whisper/bin/whisper-dump.pyMerci à ce mec, il m'a fait gagner du temps ^^
find my_root_dir -depth -exec rename 's/(.)\/([^\/])/$1\/\L$2/' {} \;
-
http://stackoverflow.com/questions/152514/how-to-rename-all-folders-and-files-to-lowercase-on-linux