This file contains hidden or 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 Test.QuickCheck | |
rev :: [a] -> [a] | |
rev xs = rev' xs [] where | |
rev' [] acc = acc | |
rev' (x:xs) acc = rev' xs (x:acc) | |
prop_revapp :: [Int] -> [Int] -> Bool | |
prop_revapp xs ys = rev (xs++ys) == rev ys ++ rev xs |
This file contains hidden or 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; | |
use Net::DBus; | |
my $bus = Net::DBus->find; | |
my $notify_service = $bus->get_service("org.freedesktop.Notifications"); |
This file contains hidden or 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
BEGIN { | |
push @INC, | |
sub { print "Oops: There was an error looking for $_[1]\n"; return \'1' }; | |
} | |
1 | |
# perl -Mshallow -c yourscript.pl |
This file contains hidden or 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; | |
use WWW::Mechanize; | |
use Getopt::Long; | |
use pQuery; | |
use Data::Dumper; | |
use Mail::Sendmail; |
This file contains hidden or 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; | |
my $editor = "gvim --remote-tab"; | |
my $linenum_param = "+"; | |
my $linenum_separ = q{ : }; | |
my $command; |
This file contains hidden or 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
<VirtualHost *:80> | |
ServerName lo | |
ServerAlias *.lo | |
DocumentRoot /home/miroslav/www | |
#do the magic: something.lo => DocumentRoot/something/document_root | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^([^.]*)\.([^.]*)$ | |
RewriteCond %{REQUEST_URI} !document_root | |
RewriteRule ^(.*)$ /%1/document_root$1 |
This file contains hidden or 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
<?php | |
use Nette\Application\UI\Form; | |
use Nette\Application\Responses\JsonResponse; | |
class HomepagePresenter extends BasePresenter | |
{ | |
private $data = array( | |
"pozdrav" => array( | |
'ahoj', 'nazdar', 'cau', 'ahojda', 'nazdarecek', 'caues' |
This file contains hidden or 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
PS1='\n\[\033[01;32m\][\t] \h \[\033[01;34m\]\W \$ \[\033[00m\]' |