This file contains 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
#/bin/sh -xe | |
# Generate QR code for WIFI network | |
test -z "$1" && echo -n "ssid: " && read ssid || ssid=$1 | |
test -z "$2" && echo -n "password: " && read pass || pass=$2 | |
qrencode -o /tmp/qr-${ssid}.png "WIFI:S:$ssid;T:WPA;P:$pass;" ; qiv -m /tmp/qr-${ssid}.png |
This file contains 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
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
my $create_table = 0; | |
sub key { | |
my ($unique,$key,$name,$cols) = @_; | |
$name = "`$name`" if defined $name; | |
return " $unique$key $name (" . join(',', map { |
This file contains 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
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
sub jmbag_check { | |
my $jmbag = shift; | |
$jmbag = sprintf "%09d", $jmbag if length $jmbag < 9; | |
my $sum = 0; | |
my $pos = 0; |
This file contains 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
#!/usr/bin/perl | |
# usage: | |
# ./audacity-labels.pl 6-nosql-take-3.aup | |
use warnings; | |
use strict; | |
use XML::Simple; | |
use Data::Dump qw(dump); |
This file contains 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
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
sub valid_jmbg { | |
my $jmbg = shift; | |
return 0 unless $jmbg =~ /^\d{13}$/; | |
my @c = split(//, $jmbg); | |
my $S=0; |
This file contains 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
use Benchmark qw(:all); | |
use Devel::Size; | |
use DevXX::Size; | |
use Storable; | |
sub _storable_freeze { | |
length Storable::freeze $_[0]; | |
} |
This file contains 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
#!/bin/sh -x | |
file=$1 | |
function encoding { | |
echo "# $1" | |
head $file | iconv -f $1 -t utf-8 | |
} | |
encoding cp850 |
This file contains 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
ack-grep --type-add perl=.ep |
NewerOlder