Skip to content

Instantly share code, notes, and snippets.

(require 'generic-x)
;; pkc mode keywords
(setq pkc-keywords-list '("compute" "count" "dedupe" "embed" "file" "frequency" "function"
"join" "keep" "macro" "minus" "print" "project" "result" "select" "union" "use"))
(require 'mmm-auto)
(setq mmm-global-mode 'maybe)
(mmm-add-classes
@prakashk
prakashk / euler-019.clj
Created December 6, 2012 17:41
Project Euler -- problem 19
;; Project Euler -- Problem 19
;; You are given the following information, but you may prefer to do
;; some research for yourself.
;; * 1 Jan 1900 was a Monday.
;; * Thirty days has September,
;; April, June and November.
;; All the rest have thirty-one,
;; Saving February alone,
@prakashk
prakashk / ics.webcast.uwex.edu.js
Created June 15, 2012 14:41
Make direct video link for YAPC 2012 Live Streams
$(document).ready(function() {
$(".cardLink").each(function() {
var href = this.href;
var video_id = this.href.split('=')[1].replace(/^(.{8})(.{4})(.{4})(.{4})(.{12})..$/, '$1-$2-$3-$4-$5');
var video_link = "http://video.ics.uwex.edu/" + video_id;
$(this).parent().append('&nbsp;<a href="' + video_link + '">[Video]</a>');
});
});
@prakashk
prakashk / 24-game.p6
Created September 3, 2010 20:05
24-game in Perl 6
# From: http://rosettacode.org/wiki/24_game
#
# The 24 Game tests one's mental arithmetic.
#
# Write a program that randomly chooses and displays four digits, each
# from one to nine, with repetitions allowed. The program should
# prompt for the player to enter an equation using just those, and all
# of those four digits. The program should check then evaluate the
# expression. The goal is for the player to enter an expression that
# evaluates to 24.
diff --git a/bin/book-to-latex b/bin/book-to-latex
index a909a46..35434d9 100644
--- a/bin/book-to-latex
+++ b/bin/book-to-latex
@@ -12,6 +12,7 @@ print <<'HEADER';
\usepackage[utf8]{inputenc}
\usepackage{makeidx}
\usepackage[colorlinks=true,pagebackref]{hyperref}
+\usepackage{wrapfig}
diff --git a/bin/book-to-latex b/bin/book-to-latex
index a909a46..f3f1018 100644
--- a/bin/book-to-latex
+++ b/bin/book-to-latex
@@ -12,6 +12,7 @@ print <<'HEADER';
\usepackage[utf8]{inputenc}
\usepackage{makeidx}
\usepackage[colorlinks=true,pagebackref]{hyperref}
+\usepackage{wrapfig}
### the patch passes the following tests :)
#?rakudo todo 'unicode'
{ # distribution for unary prefix
my @r;
@r = -« ([1, 2], [3, [4, 5]]);
my @e = ([-1, -2], [-3, [-4, -5]]);
is(~@r, ~@e, "distribution for unary prefix");
@r = -<< ([1, 2], [3, [4, 5]]);