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
import static org.junit.Assert.*; | |
import org.junit.Before; | |
import org.junit.Test; | |
public class GameTest { | |
private Game game; | |
private GameSchema plot; | |
@Before |
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 strict; | |
use warnings; | |
# http://stackoverflow.com/questions/30914955/a-perl-one-liner-into-a-bash-function | |
for (reverse 0..(shift)*60-1) {!system q!clear! and open(FIGLET,q!|figlet -f banner -c!) and printf FIGLET "%2d'%02d",$_/60,$_%60;sleep 1} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Darkside</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> |
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/bash | |
bazaar=$( perl fotoskoda.pl ) | |
# new stuff arrived | |
if [ "$bazaar" > /dev/null ]; then | |
# send me an email | |
echo "$bazaar"; | |
fi; |
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 v5.10; | |
# diamond and @ARGV | |
# to be continued... | |
@ARGV = <*.js>; | |
say $ARGV[0]; | |
while (<>) { | |
say $ARGV[0] if eof; | |
# say $. if eof; | |
} |
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 strict; | |
use warnings; | |
use v5.10; | |
for (my $i=1; $i < @ARGV; $i++) { | |
($ARGV[$i], $ARGV[$i-1]) = ($ARGV[$i-1], $ARGV[$i]) if $ARGV[$i-1] > $ARGV[$i]; | |
} | |
say $ARGV[-1] || 'no numbers'; |
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 strict; | |
use warnings; | |
my $param; | |
while (<DATA>) { | |
chomp; | |
#s/^\s+|\s+$/g; | |
$param .= (join "=", split /:/)."&"; | |
} | |
$param =~ s/[\s',]+//g; |
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 strict; | |
use warnings; | |
use LWP::UserAgent; | |
use HTTP::Request::Common; | |
use constant API | |
=> 'http://simplecast.fm/podcasts/1446/rss'; | |
my @html = split m|<title>|, | |
LWP::UserAgent->new->request(GET API)->decoded_content; |
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 strict; | |
use warnings; | |
use LWP::UserAgent; | |
use open qw/:std :utf8/; | |
use autodie; | |
use IPC::Open2; | |
# knihovna VC |
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 strict; | |
use warnings; | |
use LWP::Simple; | |
use Mojo::DOM; | |
use open qw/:std :utf8/; | |
use utf8; | |
URL: | |
for my $url (<DATA>) { | |
chomp $url; |