1106 shaares
Ça peux servir
Bon, je crois pas qu'il y est mieux en whois...
KISS, tiny drag and drop upload files
le detail d'une fiche de paye française en humour
Transfert IMAP vers IMAP
Clone de OSX OpenSource basé sur Linux bien sûr.
Pas fan, mais j'en connais qui pourrais être intéressé.
Pas fan, mais j'en connais qui pourrais être intéressé.
gab
Epure une page web de toute pub et bannière inutile.
Emplacement et logiciel pour application Windows.
Explique en détail le rôle de chaque argument dans une commande shell. Indispensable.
Pas mal de doc interressante sur la securité en général
Si je me lance dans le référencement SEO un jours...
EDIT: mediainfo me semble plus explicite (yaourt -S mediainfo dans community)
Script perl pour afficher des infos sur les vidéos.
#!/usr/bin/perl -w
use strict;
use warnings;
use IPC::Open3;
# example
my $filename = $ARGV[0];
my %videoInfo = videoInfo($filename);
print "duration: " . $videoInfo{'duration'} . "\n";
print "durationsecs: " . $videoInfo{'durationsecs'} . "\n";
print "bitrate: " . $videoInfo{'bitrate'} . "\n";
print "vcodec: " . $videoInfo{'vcodec'} . "\n";
print "vformat: " . $videoInfo{'vformat'} . "\n";
print "acodec: " . $videoInfo{'acodec'} . "\n";
print "asamplerate: " . $videoInfo{'asamplerate'} . "\n";
print "achannels: " . $videoInfo{'achannels'} . "\n";
#
# returns media information in a hash
sub videoInfo {
# ffmpeg command
my $ffmpeg = '/usr/bin/ffmpeg';
my %finfo = (
'duration' => "00:00:00.00",
'durationsecs' => "0",
'bitrate' => "0",
'vcodec' => "",
'vformat' => "",
'acodec' => "",
'asamplerate' => "0",
'achannels' => "0",
);
my $file = shift;
# escaping characters
$file =~ s/(\W)/\\$1/g;
open3( "</dev/null", ">/dev/null", \*ERPH, "$ffmpeg -i $file" ) or die "can't run $ffmpeg\n";
my @res = <ERPH>;
# parse ffmpeg output
foreach (@res) {
print;
# duration
if (m!Duration: ([0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9])!) {
$finfo{'duration'} = $1;
}
# bitrate
if (m!bitrate: (\d*) kb/s!) {
$finfo{'bitrate'} = $1;
}
# vcodec and vformat
if (/Video: (\w*), (\w*),/) {
$finfo{'vcodec'} = $1;
$finfo{'vformat'} = $2;
}
# Stream #0.1(und): Audio: aac, 48000 Hz, 1 channels, s16, 64 kb/s
# acodec, samplerate, stereo and audiorate
if (m!Audio: (\w*), (\d*) Hz, (\d*)!) {
$finfo{'acodec'} = $1;
$finfo{'asamplerate'} = $2;
$finfo{'achannels'} = $3;
}
}
my $tenths = substr( $finfo{'duration'}, 9, 2 );
my $seconds = substr( $finfo{'duration'}, 6, 2 );
my $minutes = substr( $finfo{'duration'}, 3, 2 );
my $hours = substr( $finfo{'duration'}, 0, 2 );
$finfo{'durationsecs'} = ( $tenths * .01 ) + $seconds + ( $minutes * 60 ) + ( $hours * 360 );
return %finfo;
}
Script perl pour afficher des infos sur les vidéos.
#!/usr/bin/perl -w
use strict;
use warnings;
use IPC::Open3;
# example
my $filename = $ARGV[0];
my %videoInfo = videoInfo($filename);
print "duration: " . $videoInfo{'duration'} . "\n";
print "durationsecs: " . $videoInfo{'durationsecs'} . "\n";
print "bitrate: " . $videoInfo{'bitrate'} . "\n";
print "vcodec: " . $videoInfo{'vcodec'} . "\n";
print "vformat: " . $videoInfo{'vformat'} . "\n";
print "acodec: " . $videoInfo{'acodec'} . "\n";
print "asamplerate: " . $videoInfo{'asamplerate'} . "\n";
print "achannels: " . $videoInfo{'achannels'} . "\n";
#
# returns media information in a hash
sub videoInfo {
# ffmpeg command
my $ffmpeg = '/usr/bin/ffmpeg';
my %finfo = (
'duration' => "00:00:00.00",
'durationsecs' => "0",
'bitrate' => "0",
'vcodec' => "",
'vformat' => "",
'acodec' => "",
'asamplerate' => "0",
'achannels' => "0",
);
my $file = shift;
# escaping characters
$file =~ s/(\W)/\\$1/g;
open3( "</dev/null", ">/dev/null", \*ERPH, "$ffmpeg -i $file" ) or die "can't run $ffmpeg\n";
my @res = <ERPH>;
# parse ffmpeg output
foreach (@res) {
print;
# duration
if (m!Duration: ([0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9])!) {
$finfo{'duration'} = $1;
}
# bitrate
if (m!bitrate: (\d*) kb/s!) {
$finfo{'bitrate'} = $1;
}
# vcodec and vformat
if (/Video: (\w*), (\w*),/) {
$finfo{'vcodec'} = $1;
$finfo{'vformat'} = $2;
}
# Stream #0.1(und): Audio: aac, 48000 Hz, 1 channels, s16, 64 kb/s
# acodec, samplerate, stereo and audiorate
if (m!Audio: (\w*), (\d*) Hz, (\d*)!) {
$finfo{'acodec'} = $1;
$finfo{'asamplerate'} = $2;
$finfo{'achannels'} = $3;
}
}
my $tenths = substr( $finfo{'duration'}, 9, 2 );
my $seconds = substr( $finfo{'duration'}, 6, 2 );
my $minutes = substr( $finfo{'duration'}, 3, 2 );
my $hours = substr( $finfo{'duration'}, 0, 2 );
$finfo{'durationsecs'} = ( $tenths * .01 ) + $seconds + ( $minutes * 60 ) + ( $hours * 360 );
return %finfo;
}
Gallerie de photos en Creative Common
Un tuto sur fail2ban
#!/bin/sh
# genpasswd [number of characters]
if [ -z "$1" ]; then
echo « usage: genpasswd [number of characters] »
exit 1
fi
tr -dc A-Za-z0-9_ < /dev/urandom | head -c $1 | xargs
# genpasswd [number of characters]
if [ -z "$1" ]; then
echo « usage: genpasswd [number of characters] »
exit 1
fi
tr -dc A-Za-z0-9_ < /dev/urandom | head -c $1 | xargs
Une alternative a owncloud pour les gros fichiers.
Ça donne vraiment envie de tester.
Ça donne vraiment envie de tester.
O_O
OMG!
OMG!
Un globe virtuel, un genre de google earth open source et multiplateforme.
