Skip to content

Instantly share code, notes, and snippets.

View csarven's full-sized avatar
👽
https://csarven.ca/#i

Sarven Capadisli csarven

👽
https://csarven.ca/#i
View GitHub Profile
@csarven
csarven / gist:8711388
Created January 30, 2014 15:44
install.shiny-server.sh
#!/bin/bash
# Install Node.js
sudo apt-get update
sudo apt-get install software-properties-common python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
# Install R
#!/bin/bash
sudo apt-get install r-base
sudo apt-get install r-base-dev
#sudo R
sudo su - -c "R -e \"install.packages('digest', repos='http://cran.r-project.org', dependencies=TRUE)\""
sudo su - -c "R -e \"install.packages('codetools', repos='http://cran.r-project.org', dependencies=TRUE)\""
sudo su - -c "R -e \"install.packages('memoise', repos='http://cran.r-project.org', dependencies=TRUE)\""
sudo su - -c "R -e \"install.packages('MASS', repos='http://cran.r-project.org', dependencies=TRUE)\""
@csarven
csarven / gist:9186941
Created February 24, 2014 11:47
log4j.properties.stats
#log4j.rootLogger=INFO, stdlog
log4j.rootLogger=INFO, stdlog, FusekiFileLog
log4j.appender.stdlog=org.apache.log4j.ConsoleAppender
## log4j.appender.stdlog.target=System.err
log4j.appender.stdlog.layout=org.apache.log4j.PatternLayout
#log4j.appender.stdlog.layout.ConversionPattern=%d{HH:mm:ss} %-5p %-20c{1} :: %m%n
log4j.appender.stdlog.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %-5p %-20c{1} :: %m%n
## # Example for file logging.
@csarven
csarven / gist:9187374
Created February 24, 2014 12:20
sparql.stats.270a.info.html
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix prov: <http://www.w3.org/TR/prov-o/#> .
@prefix wbtc-2014: <http://csarven.ca/wbtc-linked-data-2014#> .
wbtc-2014:exercise-2
a prov:Entity ;
rdfs:label "Exercise 2: RDF and SPARQL"@en ;
dcterms:creator <http://csarven.ca/#i> ;

Keybase proof

I hereby claim:

  • I am csarven on github.
  • I am csarven (https://keybase.io/csarven) on keybase.
  • I have a public key whose fingerprint is 0ADF F0BA CC9F 0A16 FA78 2D94 A741 87CE 3D50 8E3A

To claim this, I am signing this object:

* Checking client TLS handshake (public key matches private key)... PASSED (Reason: GENEROUS)
* Checking if certificate contains HTTP URIs in the subjectAltName field... PASSED
* Found 1 URIs in the certificate.
* Checking URI 1 (http://csarven.ca/#i)...
- Trying to fetch and process certificate(s) from webid profile...
- Profile returned an empty graph!
$('#views.lr button').on('click', function(event) {
var selected = $(this);
$('head link[rel~="stylesheet"]:not([href$="lr.css"])').each(function(i, stylesheet) {
if ($(this).prop('title').toLowerCase() == selected.text().toLowerCase()) {
$(this).prop('rel', 'stylesheet');
}
else {
$(this).prop('rel', 'stylesheet alternate');
}
$('#views.lr button').on('click', function(event) {
var selected = $(this);
$('head link[rel~="stylesheet"]:not([href$="lr.css"])').each(function(i, stylesheet) {
var s = $(this);
if (s.prop('title').toLowerCase() == selected.text().toLowerCase()) {
s.prop('rel', 'stylesheet');
}
else {
s.prop('rel', 'stylesheet alternate');
$('#views.lr button').on('click', function(event) {
var selected = $(this);
$('head link[rel~="stylesheet"]:not([href$="lr.css"])').each(function(i, stylesheet) {
if ($(this).prop('title').toLowerCase() == selected.text().toLowerCase()) {
var s = $('<link>').prop({type: 'text/css', rel: 'stylesheet', href: $(this).prop('href'), title: $(this).prop('title')});
}
else {
var s = $('<link>').prop({type: 'text/css', rel: 'stylesheet alternate', href: $(this).prop('href'), title: $(this).prop('title')});
}