Skip to content

Instantly share code, notes, and snippets.

View matthieubosquet's full-sized avatar
🌙
Dreaming of collective intelligence

Matthieu Bosquet matthieubosquet

🌙
Dreaming of collective intelligence
View GitHub Profile
@matthieubosquet
matthieubosquet / .profile
Last active April 9, 2021 11:29
Bash shell profile for MacOS
# INFO
## To switch shell:
## - Add desired shell to /etc/shells
## - Run: chsh -s <PATH_TO_SHELL>
echo "Current shell: $SHELL"
echo "Bash version: $BASH_VERSION"
# Setup
## xcode select cli tools
# xcode-select --install
@matthieubosquet
matthieubosquet / API for semantic web
Created March 17, 2019 18:09
Description of API services required for a good open linked data service
Base URLs
- for resources: https://id.example.com/
- for ontology: https://id.example.com/schema/
- for API: https://api.example.com/
API
1. Root files
/humans.txt
/robots.txt
/favicon.ico
@matthieubosquet
matthieubosquet / index.html
Last active October 24, 2018 15:53
A YASGUI with some prefix added (can't seem to get prefix fetch configuration working)
<!DOCTYPE html>
<html>
<head>
<link href='https://cdn.jsdelivr.net/npm/yasgui@2.7.29/dist/yasgui.min.css' rel='stylesheet' type='text/css'/>
<script src='https://cdn.jsdelivr.net/npm/yasgui@2.7.29/dist/yasgui.min.js'></script>
<style>
.yasgui .endpointText {
display:none !important;
}
</style>
{
"": "https://id.parliament.uk/schema/",
"id": "https://id.parliament.uk/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#"
}
@matthieubosquet
matthieubosquet / currentMemberConstituencyOnsCode.sparql
Last active July 11, 2020 18:45
Get current UK Parliament members & constituency using their SPARQL endpoint -> https://api.parliament.uk/sparql/.
PREFIX : <https://id.parliament.uk/schema/>
SELECT ?constituencyGroup ?constituencyGroupName ?constituencyGroupOnsCode ?member ?memberGivenName ?memberFamilyName
WHERE {
?constituencyGroup
a :ConstituencyGroup ;
:constituencyGroupName ?constituencyGroupName ;
:constituencyGroupHasHouseSeat ?houseSeat ;
:constituencyGroupOnsCode ?constituencyGroupOnsCode .
FILTER NOT EXISTS { ?constituencyGroup a :PastConstituencyGroup . }
?houseSeat
{
"vscode": "snippets"
}
@matthieubosquet
matthieubosquet / vimrc
Last active September 29, 2015 09:47
Fichier de conifguration de vim
" Commandes de base "
"""""""""""""""""""""
" Afficher l'aide d'une commande
" :help echo
"
" Afficher quelque chose
" :echo "vi rules !"
"
" Connaitre la valeur de variables
" :set history?
@matthieubosquet
matthieubosquet / search.py
Created December 28, 2011 08:02
Python search command line script
#!/usr/bin/python
#
# Python search script 0.1
# 14th of june 2011 (started v0.0 on 1st of june 2011)
#
# Copyright 2011 Matthieu Bosquet
# Licensed under the GPL, Version 3.0
# http://www.gnu.org/licenses/gpl-3.0.txt
import argparse
@matthieubosquet
matthieubosquet / bashrc
Created December 23, 2011 15:35
Custom shell for debian
# Custom Bash neig.es
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# If changed, Update $LINES and $COLUMNS after each command
shopt -s checkwinsize
# Default editor
export EDITOR=vim