- Source http://tinyurl.com/alice-clj
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
Day job: Senior R&D Developer | |
What is your language of choice: Java/Clojure | |
Open Source contributions: lambdalf, maven-alfresco-archetypes | |
How do you use GitHub: All the OpenSource code I can possibly push in there, \ | |
my personal CV, \ | |
snippets and sample projects backing up my blog posts, \ | |
keep myself up to date with tons of OpenSource projects, \ | |
meet fellow techies, \ | |
earn badges on some other social coding sites, \ | |
give extra points to interviewees with an in-shape GitHub account. |
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
private static List<String> ASSOC_NAMES_TO_EXTRACT = Arrays.asList(new String[]{"imageRef","thumbnailRef"}); | |
/** | |
* Gets a list of associations of type my:imageRef and my:thumbnailRef, given an Alfresco node; | |
* Implementation is not optimal | |
* @param nodeRef The Alfresco NodeRef that contains the associations we want to extract | |
* @return a List of associations of type my:imageRef and my:thumbnailRef | |
*/ | |
public List<AssociationRef> getAssociations(NodeRef nodeRef) { | |
List<AssociationRef> associations = serviceRegistry.getNodeService().getTargetAssocs(nodeRef, RegexQNamePattern.MATCH_ALL); | |
List<AssociationRef> toReturn = new ArrayList<AssociationRef>(); |
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
(ns proc | |
(:import [java.lang ProcessBuilder]) | |
(:use [clojure.java.io :only [reader writer]])) | |
(defn spawn [& args] | |
(let [process (-> (ProcessBuilder. args) | |
(.start))] | |
{:out (-> process | |
(.getInputStream) | |
(reader)) |
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
gifcast () { | |
mkdir /tmp/gifcast | |
ffmpeg -i "$@" -r 10 /tmp/gifcast/gifcast%05d.png | |
convert -layers Optimize /tmp/gifcast/gifcast*.png gifcast.gif | |
rm /tmp/gifcast/gifcast*.png | |
rmdir /tmp/gifcast | |
} |