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 |
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
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
#!/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
#!/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 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 | |
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
#/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
newest version of this gist is part of wiki at https://github.com/mchck/mchck/wiki/ezPort | |
ezPort setup for flasing rig is deescibed at https://mchck.org/blog/2013-09-12-mc_hck_flashing_rig | |
pinout from updated https://github.com/mchck/mchck/wiki/Pinout | |
MCU pinput source http://cache.freescale.com/files/32bit/doc/data_sheet/K20P48M50SF0.pdf | |
ezPort description, chapter 29, http://cache.freescale.com/files/32bit/doc/ref_manual/K20P48M50SF0RM.pdf | |
MCU MCHCK ezPort |
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; | |
use Mojo::UserAgent; | |
use Mojo::DOM; | |
my $ua = Mojo::UserAgent->new; | |
my @selection = qw( H Y B K D SS ); |
OlderNewer