Skip to content

Instantly share code, notes, and snippets.

View ziodave's full-sized avatar

David Riccitelli ziodave

View GitHub Profile
@ziodave
ziodave / ckan.sh
Last active August 29, 2015 14:00
install CKAN on Mac OS X (very alpha)
#!/bin/bash
export CKAN_HOME=~/Developer/ckan
export SOLR_TMPL_CONF=/usr/local/opt/solr/libexec/example/solr
install_prerequisites() {
brew install solr
brew install postgres
brew install python
pip install --upgrade setuptools
@ziodave
ziodave / silk-workstation
Created May 7, 2014 12:35
A silk-workstation scripts that handles being launched as a symlink.
#!/bin/bash
### ------------------------------- ###
### Helper methods for BASH scripts ###
### ------------------------------- ###
resolve_symlink() {
SCRIPT=$1 NEWSCRIPT=''
until [ "$SCRIPT" = "$NEWSCRIPT" ]; do
if [ "${SCRIPT:0:1}" = '.' ]; then SCRIPT=$PWD/$SCRIPT; fi
@ziodave
ziodave / r28965-patch
Last active August 29, 2015 14:03
Patch file for WordPress r28965
Index: includes/install.php
===================================================================
--- includes/install.php (revision 28965)
+++ includes/install.php (working copy)
@@ -6,6 +6,7 @@
*/
error_reporting( E_ALL & ~E_DEPRECATED & ~E_STRICT );
+define( 'WP_INSTALLING', true );
$config_file_path = $argv[1];
@ziodave
ziodave / WordPressAuthenticationProvider.java
Last active August 29, 2015 14:04
Spring Security : WordPress Authentication Filter (a draft)
package io.insideout.chat.security;
import io.insideout.chat.domain.WordPressUser;
import io.insideout.chat.services.WordPressAuthenticationService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
<?php
// ========================
// = Plugin settings page =
// ========================
class ABC_Settings extends ABC_Core {
public function __construct()
{
@ziodave
ziodave / collectd-stockholm
Created March 9, 2015 14:03
collectd-stockholm
{
"title": "collectd-stockholm",
"services": {
"query": {
"list": {
"0": {
"query": "plugin: \"cpu\" AND plugin_instance: \"0\" AND host:\"stockholm\"",
"alias": "cpu1",
"color": "#7EB26D",
"id": 0,
2015-09-16 14:02:47.762 INFO --- [ main] t.helixware.plugins.mico.MicoClientTest : Current annotation object:
Annotation{resource='http://demo2.mico-project.eu:8080/marmotta/5ba6db49-4968-48ca-8f5b-afe3127b3b15', body=Body{resource=http://demo2.mico-project.eu:8080/marmotta/e179be4c-964b-431b-a7a4-c9c3184b5fa9'}, target=Target{resource='http://demo2.mico-project.eu:8080/marmotta/58a97bcb-a05c-4765-8856-8f04435009d0'}, motivatedBy=null, serializedBy=null, serializedAt='null', annotatedBy=Software{resource='http://demo2.mico-project.eu:8080/marmotta/066b7cc1-b8f4-46e9-955c-8c4e77a128e9', name='http://www.mico-project.eu/broker/injection-web-service', homepage='null'}, annotatedAt='2015-09-16 13:01:59.161'}
2015-09-16 14:02:49.934 INFO --- [ main] t.helixware.plugins.mico.MicoClientTest : Current annotation object:
Annotation{resource='http://demo2.mico-project.eu:8080/marmotta/17d9e69a-8985-4f5c-93fd-ac643a218635', body=Body{resource=http://demo2.mico-project.eu:8080/marmotta/01f
@ziodave
ziodave / 000-homebrew.diff
Created August 8, 2012 13:37
patch for freeling 3-HEAD configure.ac
Index: configure.ac
===================================================================
--- configure.ac (revision 1666)
+++ configure.ac (working copy)
@@ -227,4 +227,6 @@
src/tests/Makefile
freeling.pc])
+AC_PREFIX_DEFAULT(/usr/local/Cellar/freeling)
+
2015-10-08 17:33:03.151 INFO 24176 --- [ool-1-thread-10] tv.helixware.mico.services.PartService : Current annotation object:
Annotation{resource='http://demo2.mico-project.eu:8080/marmotta/b6e0d091-8590-4a86-895e-89a589d654a7', body=Body{resource=http://demo2.mico-project.eu:8080/marmotta/dd187308-e66f-4a03-9a49-6364e7e33044'}, targets=Target{resource='http://demo2.mico-project.eu:8080/marmotta/16ceeb33-39d8-4494-bb73-18c4b1bc5642'}, motivatedBy=null, serializedBy=null, serializedAt='null', annotatedBy=Software{resource='http://demo2.mico-project.eu:8080/marmotta/b178389e-385a-428e-9748-b70cb73e509b', name='http://www.mico-project.eu/broker/injection-web-service', homepage='null'}, annotatedAt='2015-10-08 16:32:07.957'}
2015-10-08 17:33:04.500 INFO 24176 --- [ool-1-thread-10] o.o.r.o.m.helpers.SimpleRoleMapper : Unregistered type http://www.mico-project.eu/ns/platform/1.0/schema#ContentPart
2015-10-08 17:33:05.119 INFO 24176 --- [ool-1-thread-10] tv.helixware.mico.services.PartService : Current
@ziodave
ziodave / freeling.rb
Created November 12, 2012 16:29
Freeling Formula for Brew
require 'formula'
# thanks to ambs for the seed of this formula, https://github.com/ambs
class Freeling < Formula
url 'http://devel.cpl.upc.edu/freeling/downloads/21'
version '3.0'
sha1 'd05242e398f60d9720f9bbde2743ea469b1531d1'
# head 'http://devel.cpl.upc.edu/freeling/svn/trunk', :using => :svn