Skip to content

Instantly share code, notes, and snippets.

@paulwilton
paulwilton / dbpedia-3.9-stripped.owl
Last active August 29, 2015 14:05
A modified version of the DBpedia 3.9 ontology with predicate domains and (owl:ObjectProperty) ranges stripped. See my blog post : http://www.datalanguage.com/blog/2014/08/01/reasoning-with-dbpedia-39/
<rdf:RDF xml:base="http://dbpedia.org/ontology/" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#">
<owl:Ontology rdf:about="">
<owl:versionInfo xml:lang="en">Version 3.9</owl:versionInfo>
<comment xml:lang="en">DBpedia 3.9 ontology stripped of all domains, and object property ranges</comment>
</owl:Ontology>
<owl:Class rdf:about="http://dbpedia.org/ontology/BasketballLeague">
<rdfs:label xml:lang="el">Ομοσπονδία Καλαθοσφαίρισης</rdfs:label>
@LaurensRietveld
LaurensRietveld / README.md
Last active September 14, 2018 02:44
Combining #YASQE and #YASR

A simple example on how to combine YASQE and YASR. Any SPARQL result received via YASQE are passed on to YASR. YASR, uses any prefixes defined in YASQE to prettify the SPARQL results.

@samuelsolis
samuelsolis / drupalphpheader.module
Last active December 26, 2016 12:01
Add custom php header to a drupal 7 view
function MYMODULE_views_pre_view(&$view, &$display_id, &$args){
if ($view->name == 'VIEWNAME' && $display_id == 'DISPLAYNAME'){
$header = 'MYCODE';
$options = array(
'empty' => 1,
'content' => $header,
'label' => NULL,
);
$view->add_item('DISPLAYNAME', 'header', 'views','area_text_custom', $options);
}
@nicdoye
nicdoye / csvwriter.groovy
Created November 29, 2013 17:52
Quick example of using Apache Commons CSV (1.0-Snapshot) to write to a CSV file in groovy.
import org.apache.commons.csv.CSVPrinter
import org.apache.commons.csv.CSVFormat
CSVPrinter printer = new CSVPrinter(
new PrintWriter("test.csv"),
CSVFormat.DEFAULT
)
answer = [ [5,6,"asdf",7],[9,10,"a b","z,x",12]]
/**
* Adds method arg to the Drupal object for grabbing url args
*
* @author Aaron Klump, In the Loft Studios, LLC
* @see http://www.intheloftstudios.com
* @see http://gist.github.com/3078482
*
* For use in a theme or module add the following to your .info file
* @code
* scripts[] = [path to js dir]/drupal.arg.js
@simme
simme / drupal_table_pager.php
Created August 23, 2012 11:51
Drupal table with pager from db_select()
<?php
/**
* Display point award report.
*
* Generates a list of awarded points.
*
* @return array $content
*/
function game_report_page_points() {
// For some mysterious reason only parts of the db_select API is chainable.
@level09
level09 / rebuild_permissions
Created July 21, 2012 12:02
Drush: rebuild permissions table using command line in Drupal
drush php-eval 'node_access_rebuild();'
@akikoo
akikoo / scss base template
Created July 7, 2012 19:55
SCSS (Sass) template with cross-browser CSS3 mixins
/* Welcome to Compass.
* In this file you should write your main styles. (or centralize your imports)
* Import this file using the following HTML or equivalent:
* <link rel="stylesheet" href="/stylesheets/screen.css" media="screen" type="text/css" /> */
// This comment is not output to CSS
/* This comment is output to CSS */
// The CSS3 module provides cross-browser mixins for CSS properties
@remy
remy / gist:2484402
Created April 24, 2012 22:45
jquery.marquee.js
/**
* author Remy Sharp
* url http://remysharp.com/tag/marquee
*/
(function ($) {
$.fn.marquee = function (klass) {
var newMarquee = [],
last = this.length;
@pascalduez
pascalduez / demo.module
Created December 24, 2011 15:02
Drupal 7 — Basic Ajax form submit (Ajax framework)
<?php
/**
* @file
* Demo module, Basic Ajax form submit (Ajax framework).
*/
/**
* Implements hook_menu().
*/