Skip to content

Instantly share code, notes, and snippets.

View nicolamontecchio's full-sized avatar

Nicola Montecchio nicolamontecchio

View GitHub Profile
@ghoseb
ghoseb / ns-cheatsheet.clj
Last active November 7, 2024 19:26 — forked from alandipert/ns-cheatsheet.clj
Clojure ns syntax cheat-sheet
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix
;; and optionally can refer functions to the current ns.
;;
;; * :import refers Java classes to the current namespace.
;;
;; * :refer-clojure affects availability of built-in (clojure.core)
;; functions.
@xavierd
xavierd / complete.cc
Created December 29, 2010 15:20
Hacking with libclang completion.
#include <clang-c/Index.h>
#include <cstdlib>
#include <iostream>
/*
* Compile with:
* g++ complete.cc -o complete -lclang -L/usr/lib/llvm
* Run with:
* LIBCLANG_TIMING=1 ./complete file.cc line column [clang args...]
*/
@dln
dln / gist:968700
Created May 12, 2011 15:11
Using JNA directly from the Scala REPL
$ scala
Welcome to Scala version 2.8.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_24).
Type in expressions to have them evaluated.
Type :help for more information.
scala> :cp /usr/share/java/jna.jar
Added '/usr/share/java/jna.jar'. Your new classpath is:
.:/usr/share/java/jna.jar
scala> import com.sun.jna._