Download and install the docx2txt converter from http://docx2txt.sourceforge.net/
wget -O doc2txt.tar.gz http://docx2txt.cvs.sourceforge.net/viewvc/docx2txt/?view=tar
tar zxf docx2txt.tar.gz
cd docx2txt/docx2txt/
sudo make
CREATE OR REPLACE FUNCTION "ORACLEGIT"."F" return varchar as | |
begin | |
return | |
'Hello world'; | |
end; |
#!/bin/sh | |
# a quick & dirty script to create a TinyCore initrd (for Core >= 4.2) | |
H=$( pwd ) | |
M=$( mount | grep iso9660 | head -1 | awk '{print $3}' ) | |
[ -z "$M" ] && echo "can not find mounted CD-ROM" && exit 1 | |
D=$( mktemp -d ) |
#!/bin/sh | |
# blog post: http://www.sitepoint.com/one-click-app-deployment-server-side-git-hooks/ | |
## store the arguments given to the script | |
read oldrev newrev refname | |
## Where to store the log information about the updates | |
LOGFILE=./post-receive.log | |
# The deployed directory (the running site) | |
DEPLOYDIR=/var/www/html/simpleapp |
Download and install the docx2txt converter from http://docx2txt.sourceforge.net/
wget -O doc2txt.tar.gz http://docx2txt.cvs.sourceforge.net/viewvc/docx2txt/?view=tar
tar zxf docx2txt.tar.gz
cd docx2txt/docx2txt/
sudo make
# array | |
>>> [1] | |
[1] | |
>>> [1,] | |
[1] | |
# hash | |
>>> {'a':1} | |
{'a': 1} | |
>>> {'a':1,} |
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Building a VPC from scratch with CloudFormation", | |
"Mappings": { | |
"SubnetConfig": { | |
"VPC": { "CIDR": "10.0.0.0/16" }, | |
"Public": { "CIDR": "10.0.0.0/24" } | |
}, | |
"RegionMap" : { |
import org.apache.commons.codec.digest.DigestUtils; | |
public class GitSha1 { | |
public static String githash(String aString){ | |
return DigestUtils.sha1Hex("blob " + aString.length() + "\0" + aString); | |
} | |
public static void main(String[] args) { |
;; 1 | |
;; the nth element of the series | |
(defn pi-series [n] | |
(/ (* 4 (Math/pow -1 n)) (inc (* 2 n)))) | |
;; lazy sequence giving the individual terms | |
(def pi1 (map #(pi-series %) (iterate inc 0))) | |
;; basically the same, but will use fractions (slower, but nice to look at) | |
(def pi2 (map #(/ (* 4 (expt -1 %)) (+ (* 2 %) 1)) (iterate inc 0))) |
;;; all code in this function lifted from the clojure-mode function | |
;;; from clojure-mode.el | |
(defun clojure-font-lock-setup () | |
(interactive) | |
(set (make-local-variable 'lisp-indent-function) | |
'clojure-indent-function) | |
(set (make-local-variable 'lisp-doc-string-elt-property) | |
'clojure-doc-string-elt) | |
(set (make-local-variable 'font-lock-multiline) t) |
(ns daft | |
(meta {:description "The song 'Around the World' by Daft Punk has a deeply repetitive nature, unfortunately the lyrics is oftent stated wrong. | |
The song has 4 verses consisting of 8, 16, 28 and 20 double repetitions of the phrase 'Around the world'. | |
All in all, the song has 72 double repetitions or 144 repetitions of the iconic phrase."})) | |
(def lyrics (repeat "Around the world, around the world")) | |
(defn sing [lyrics] | |
(reduce str | |
(interleave |