Skip to content

Instantly share code, notes, and snippets.

Avatar

Martin Owen mowen

View GitHub Profile
View euler-6.clj
(ns martin)
(defn sqr
"Square the given number."
[n]
(. (BigInteger/valueOf n) (pow 2)))
(defn euler-6
"Find the difference between the sum of the squares of the first one hundred
natural numbers and the square of the sum."
@mowen
mowen / org-style.css
Created Mar 9, 2010
A stylesheet for the Emacs Org Mode HTML export
View org-style.css
/**
* This stylesheet will work pretty well with a regular Org Mode HTML export.
* However, you do have to turn off all of the defaults:
*
* (setq org-export-html-style-include-scripts nil
* org-export-html-style-include-default nil)
*
* and insert a call to the stylesheet:
*
* (setq org-export-html-style
View SiteFocus.js
/**
* SiteFocus, an enhanced version of the Blacklist Sites - Page Mods Demo.
* Recommended for anyone who has this problem: http://xkcd.com/477/
* Martin Owen - martinowenuk@gmail.com
*/
jetpack.future.import("storage.simple");
jetpack.future.import('menu');
function SiteFocus() {
View euler4.el
;; A palindromic number reads the same both ways. The largest palindrome made
;; from the product of two 2-digit numbers is 9009 = 91 × 99.
;;
;; Find the largest palindrome made from the product of two 3-digit numbers.
;;
(defun array-reverse (array)
"Reverse the ARRAY."
(let ((reversed-array (copy-sequence array))
(array-length (length array))
View gist:291247
(eval-after-load 'org
'(progn
(set-face-foreground 'org-level-2 "magenta4")
(set-face-foreground 'outline-2 "magenta4")
(set-face-foreground 'org-level-6 "red3")
(set-face-foreground 'outline-6 "red3")))