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 foo; | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.SQLException; | |
import java.sql.Statement; | |
import java.util.Properties; | |
/** |
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
# | |
# Debian useful commands | |
#---- | |
# look for eventually installed packages that provide filename.ext | |
dpkg -D filename.ext | |
# | |
# Various stuff | |
#---- |
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
<%-- | |
Original source: http://paste.lisp.org/display/71541 | |
--%> | |
<%-- | |
This JSP page is intended to start swank-clojure | |
in a running Java system executed in an HTTP | |
container like Tomcat, so that you can connect to | |
it from SLIME and interactively inspect, control and | |
modify it. |
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 skuro.alfresco.clojure | |
:import (org.alfresco.util ApplicationContextHelper ApplicationContextHelper$RunAsWork) | |
(org.alfresco.repo.transaction RetryingTransactionHelper RetryingTransactionHelper$RetryingTransactionCallback)) | |
;; this is problematic: it looks like swank is launched in a separated class loader! | |
;; this usually results in the spring ctx to be recreated | |
(def ctx (. ApplicationContextHelper getApplicationContext)) | |
(defn run-as [user work] | |
(. AuthenticationUtil runAs |
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
$ sc-server | |
SproutCore v1.4.1 Development Server | |
Starting server at http://0.0.0.0:4020 in debug mode | |
To quit sc-server, press Control-C | |
>> Thin web server (v1.2.7 codename No Hup) | |
>> Maximum connections set to 1024 | |
>> Listening on 0.0.0.0:4020, CTRL+C to stop | |
LocalJumpError: no block given | |
/Library/Ruby/Gems/1.8/gems/sproutcore-1.4.1/lib/sproutcore/models/manifest.rb:26:in `each' | |
/Library/Ruby/Gems/1.8/gems/sproutcore-1.4.1/lib/sproutcore/models/manifest.rb:26:in `visible' |
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
public class Tak { | |
static Integer tak (Integer x, Integer y, Integer z) { | |
if (y >= x) { | |
return z; | |
} | |
return tak (tak (x - 1, y, z), tak (y - 1, z, x), tak (z - 1, x, y)); | |
} |
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 forms are currently useless | |
;; Import the protocol | |
(import '[spring.surf.webscript WebScript]) | |
;; Let's make use of some utility functions | |
(require '[spring.surf.webscript :as w]) | |
;; Concrete WebScript implementation | |
(deftype SampleWebScript |
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 alfresco.sample | |
(:require [alfresco.nodes :as n] | |
[alfresco.model :as m] | |
[alfresco.auth :as a])) | |
;; Creates a tree-seq to navigate a repository sub branch | |
(defn ts | |
[root] | |
(a/as-admin ;; in a normal context, you should already be authenticated | |
(let [user (a/whoami) ;; store the currently authenticated user, needed by the following closures |
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
// just to show the calls in the wtf.java file | |
public String getId() { | |
return id; | |
} |
OlderNewer