Skip to content

Instantly share code, notes, and snippets.

View thibaudcolas's full-sized avatar
😀

Thibaud Colas thibaudcolas

😀
View GitHub Profile
@thibaudcolas
thibaudcolas / instantclick-browserify-1.html
Last active August 29, 2015 14:11
UMD-wrapped InstantClick, bundled with browserify for the Web. Test (beware broken links between the two files): https://rawgit.com/ThibWeb/1c6ea5c6b87b623aa217/raw/caca7eadff5f5ee319dac62c9a94d847cf22e931/instantclick-browserify-1.html
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>#1 Hello world!</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<p>#1 Hello world!</p>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thibaudcolas
thibaudcolas / rubegoldbash.sh
Last active August 29, 2015 14:14
will's RubeGoldBash game
ls ~ | grep bash
ls ~ | grep bash | wc -l
history
dig +short myip.opendns.com @resolver1.opendns.com
curl -s ip.appspot.com
curl -s ip.appspot.com | xargs -n 1 curl -s "freegeoip.net/csv/$1" | cut -d ',' -f '9 10' | sed 's/,/\&lon=/g' | xargs -n 1 echo "http://api.openweathermap.org/data/2.5/weather?mode=html&lat=$1" | sed 's/ //g' | xargs -n 1 curl -s $1 | lynx -stdin -dump
ps aux
[ $[ $RANDOM % 6 ] == 0 ] && echo "You die" || echo "You live"
@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 / 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">
/***************** hello-es6.js *****************/
console.log('HELLO ES6');
/***************** template-strings.js *****************/
const name = process.argv[2];