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 envtest | |
| (:use [clojure.test]) | |
| (:require [http.async.client :as http] | |
| [http.async.client.request :as request])) | |
| (def lambdalf-url "http://localhost:9090/lambdalf-webapp") | |
| (def ^:dynamic *client* nil) | |
| (defn- once-fixture [f] |
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
| >++++++++[<++++++++>-]<+++. | |
| >++++++++++[<+++++>-]<------. | |
| -. | |
| -------. | |
| +++++++++++. | |
| >+++++[<--->-]<--. | |
| >++++++[<+++>-]<+. | |
| +. | |
| >+++[<--->-]<. | |
| >+++++[<-->-]<-. |
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
| import java.util.Date; | |
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.Executors; | |
| import java.util.concurrent.Future; | |
| import java.util.concurrent.TimeUnit; | |
| import org.junit.Test; | |
| /** | |
| * @author Carlo Sciolla |
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
| <?xml version="1.0"?> | |
| <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> | |
| <Configure class="org.mortbay.jetty.Server"> | |
| <New id="jcr-datastore" class="org.mortbay.jetty.plus.naming.Resource"> | |
| <Arg>jdbc/DataStore</Arg> | |
| <Arg> | |
| <New class="com.mchange.v2.c3p0.ComboPooledDataSource"> | |
| <Set name="driverClass">com.mysql.jdbc.Driver</Set> | |
| <Set name="jdbcUrl">jdbc:mysql://localhost:3306/jcr_datastore</Set> |
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/sh | |
| # | |
| # Rebases all the incoming changes from remote subversion | |
| # repositories. All repos are expected to be found as first | |
| # children of a root folder. A log file is created per repo. | |
| # | |
| # author: Carlo Sciolla | |
| # Root folder of all modules containing git-svn checkouts | |
| BB_HOME=/Users/skuro/Development/Backbase/git |
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/sh | |
| # SVN post-commit hook to link revisions to JIRA tickets | |
| # | |
| # Author: Carlo Sciolla <carlo@backbase.com> | |
| # Revision: 0.1 | |
| # fill in your Jira credentials and URL: | |
| USER=foo | |
| PASS=test123 |
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
| package tk.skuro; | |
| public class Bean { | |
| private final String _value; | |
| public Bean(String value) { | |
| _value = value; | |
| } |
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
| ; https://www.hackerrank.com/challenges/functional-programming-warmups-in-recursion---fibonacci-numbers | |
| (let [fibos (iterate (fn [[a0 a1]] [a1 (+ a0 a1)]) [0 1]) | |
| fibo (fn [n] (->> n dec (nth fibos) first))] | |
| (-> | |
| (read) | |
| fibo | |
| println)) | |
| ;https://www.hackerrank.com/challenges/pascals-triangle | |
| (let [k (read) |
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
| #_( | |
| Amsterdam Clojurians Dojo#3: A nonogram solver | |
| ============================================== | |
| Fork this gist and provide your solution! | |
| ) |