Skip to content

Instantly share code, notes, and snippets.

View thibaudcolas's full-sized avatar
😀

Thibaud Colas thibaudcolas

😀
View GitHub Profile
@thibaudcolas
thibaudcolas / live-build.xml
Last active October 6, 2015 11:48
Fast-paced dev Ant build file
<?xml version="1.0" encoding="ISO-8859-1"?>
<project default="launch" name="live-sdmx-datacube" basedir="/Users/Will/Projects/datalift-sdmxdatacube/sdmxdatacube">
<!-- ================ Property Definitions ============================== -->
<property name="tomcat.home" value="/Library/Tomcat"/>
<property name="tomcat.datalift" value="${tomcat.home}/webapps/datalift/"/>
<property name="tomcat.bootstrap" value="${tomcat.home}/bin/bootstrap.jar"/>
<property name="tomcat.port" value="8080"/>
<property name="tomcat.server" value="localhost"/>
@thibaudcolas
thibaudcolas / i18nrender.java
Created July 10, 2012 10:10
i18n internationalization with parameters
import java.text.MessageFormat;
/**
* {@inheritDoc}
* @return True if the given key exists for our context, false otherwise.
*/
@Override
public boolean render(InternalContextAdapter context, Writer writer,
Node node)
throws IOException, ResourceNotFoundException,
#!/usr/bin/env bash
#
# Callfinder is a really dumb tool that helps you
# find if/where functions/classes/variables are used.
# It uses grep to find occurences of given strings.
# @author ThibWeb
#
# Usage : ./callfinder.sh FILE THRESHOLD
# FILE is the path to a file where each line is a function to search for.
# Ex : grep my/js/file.js 'function' > function-file.txt
@thibaudcolas
thibaudcolas / foaf.rdf
Last active July 21, 2018 15:51
Thibaud Colas' FOAF profile
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF
xml:base="http://thib.me/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
xmlns:cert="http://www.w3.org/ns/auth/cert#"
@thibaudcolas
thibaudcolas / french-diaspora-2011.rdf
Created September 30, 2012 16:06
Lift de données statistiques
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xml:base="http://example.org/french-abroad/"
xmlns:dct="http://purl.org/dc/terms/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:qb="http://purl.org/linked-data/cube#"
xmlns:sdmx-attribute="http://purl.org/linked-data/sdmx/2009/attribute#"
xmlns:sdmx-subject="http://purl.org/linked-data/sdmx/2009/subject#"
@thibaudcolas
thibaudcolas / googleglobal.xml
Created November 10, 2012 19:59
Google global search for Firefox
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Google Global</ShortName>
<Description>Google Global Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">
data:image/png;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADs9Pt8xetPtu9FsfFNtu%2BTzvb2%2B%2Fne4dFJeBw0egA%2FfAJAfAA8ewBBegAAAAD%2B%2FPtft98Mp%2BwWsfAVsvEbs%2FQeqvF8xO7%2F%2F%2F63yqkxdgM7gwE%2FggM%2BfQA%2BegBDeQDe7PIbotgQufcMufEPtfIPsvAbs%2FQvq%2Bfz%2Bf%2F%2B%2B%2FZKhR05hgBBhQI8hgBAgAI9ewD0%2B%2Fg3pswAtO8Cxf4Kw%2FsJvvYAqupKsNv%2B%2Fv7%2F%2FP5VkSU0iQA7jQA9hgBDgQU%2BfQH%2F%2Ff%2FQ6fM4sM4KsN8AteMCruIqqdbZ7PH8%2Fv%2Fg6Nc%2Fhg05kAA8jAM9iQI%2BhQA%2BgQDQu6b97uv%2F%2F%2F7V8Pqw3eiWz97q8%2Ff%2F%2F%2F%2F7%2FPptpkkqjQE4kwA7kAA5iwI8iAA8hQCOSSKdXjiyflbAkG7u2s%2F%2B%2F%2F39%2F%2F7r8utrqEYtjQE8lgA7kwA7kwA9jwA9igA9hACiWSekVRyeSgiYSBHx6N%2F%2B%2Fv7k7OFRmiYtlAA5lwI7lwI4lAA7kgI9jwE9iwI4iQCoVhWcTxCmb0K%2BooT8%2Fv%2F7%2F%2F%2FJ2r8fdwI1mwA3mQA3mgA8lAE8lAE4jwA9iwE%
@thibaudcolas
thibaudcolas / avance.html
Created November 29, 2012 21:09
Révisions TP8 GLIN102
<!--
Cette page est en HTML5.
Certaines balises viennent s'ajouter à celles vues en TP,
mais elles ne sont pas plus difficiles à utiliser.
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
#!/usr/bin/env bash
#
cat geonames_insee_reg_dept.rdf | grep 'rdf:about' | cut -c 25-56 | sort > reg_dept.txt
cat reg_dept.txt | grep . | sed 's/$/about.rdf/' > reg_dept_links.txt
wget -i reg_dept_links.txt -O geonames_tmp.rdf
cat geonames_tmp.rdf | grep '?xml' | uniq > geonames_reg_dept.rdf
cat geonames_tmp.rdf | grep '<rdf:RDF' | uniq >> geonames_reg_dept.rdf
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
# Number of entities per RDF type.
SELECT ?type (count(?s) AS ?nbEntities)
WHERE {
?s rdf:type ?type
}
GROUP BY ?type
├── aopalliance
│   ├── aopalliance-1.0.jar
├── commons-codec
│   ├── commons-codec-1.4.jar
├── commons-dbcp
│   ├── commons-dbcp-1.3.jar
├── commons-httpclient
│   ├── commons-httpclient-3.1.jar
├── commons-logging
│   ├── commons-logging-1.1.1.jar