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
| use Dancer; | |
| use DBI; | |
| use File::Spec; | |
| use File::Slurp; | |
| use Template; | |
| set 'database' => File::Spec->tmpdir() . '/dancr.db'; | |
| set 'session' => 'Simple'; | |
| set 'template' => 'template_toolkit'; | |
| set 'logger' => 'console'; |
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
| #! /bin/bash | |
| [ "$#" -ne 2 ] && exit 1 | |
| tar -tf "$2" | grep -v '/$' \ | |
| | while read file | |
| do tar -Ozxf "$2" "$file" | grep "$1" && echo $file | |
| done |
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 | |
| // Stolen from: http://www.holisticsystems.co.uk/blog/?p=931 | |
| $server = 'localhost'; | |
| $username = 'user'; | |
| $password = 'password'; | |
| $database = 'database'; | |
| $new_charset = 'utf8'; | |
| $new_collation = 'utf8_general_ci'; |
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
| #!/bin/bash | |
| # pdf2book: Converting PDF file into booklet | |
| ERR=0 | |
| for i in pdftops psbook psnup; do | |
| if [ ! "$(which $i)" ]; then | |
| echo Error: $i not found | |
| ERR=1 | |
| fi |
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
| directory "tmp" | |
| file "tmp/hello.tmp" => "tmp" do | |
| sh "echo 'Hello' > 'tmp/hello.tmp'" | |
| end | |
| task :default => 'morning:turn_off_alarm' | |
| namespace :morning do | |
| desc "Turn off alarm." |
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/env clisp | |
| (setq dzien (nth 3 (multiple-value-list (get-decoded-time) ))) | |
| (setq miesiac-n (nth 4 (multiple-value-list (get-decoded-time) ))) | |
| (setq rok (nth 5 (multiple-value-list (get-decoded-time) ))) | |
| (setq miesiace `("stycznia" "lutego" "marca" "kwietnia" "maja" "czerwca" "lipca" "sierpnia" "września" "października" "listopada" "grudnia")) | |
| (setq miesiac (nth (- miesiac-n 1) miesiace)) | |
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 | |
| # | |
| if (($#ARGV+1) == 1) { | |
| $i = $ARGV[0]; | |
| $plural = $i == 1 ? 'znak' : $i % 10 >= 2 && $i % 10 <= 4 && ($i % 100 < 10 || $i % 100 >= 20) ? 'znaki' : 'znaków'; | |
| print "$i $plural\n"; | |
| } |
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 | |
| /** | |
| * Math Captcha class. | |
| * | |
| * Generates a simple, plain text math equation as an alternative to image-based CAPTCHAs. | |
| * | |
| * require __DIR__.'/../mathcaptcha.php'; | |
| * | |
| * $captcha = new MathCaptcha(); | |
| * |
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
| #! /bin/bash | |
| # Debian ISO weekly builds | |
| # | |
| #set -x | |
| DEBIAN_ISO_URL=( | |
| http://cdimage.debian.org/cdimage/daily-builds/daily/current/i386/iso-cd/debian-testing-i386-netinst.iso | |
| http://cdimage.debian.org/cdimage/daily-builds/daily/current/amd64/iso-cd/debian-testing-amd64-netinst.iso | |
| http://cdimage.debian.org/cdimage/weekly-builds/amd64/iso-cd/debian-testing-amd64-CD-1.iso | |
| http://cdimage.debian.org/cdimage/weekly-builds/i386/iso-cd/debian-testing-i386-CD-1.iso |
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
| function EmailNotify() { | |
| var label = GmailApp.getUserLabelByName('Notify'); | |
| var threads = label.getThreads(); | |
| for (var x in threads) { | |
| var messages = threads[x].getMessages(); | |
| for (var i = 0; i < messages.length; i++) { | |
| var message = messages[i]; | |
| if (message.isUnread()){ | |
| var emailAddressForNotify = '[email protected]'; | |
| //Logger.log(message.getFrom()); |