Skip to content

Instantly share code, notes, and snippets.

View ziodave's full-sized avatar

David Riccitelli ziodave

View GitHub Profile
{
"title": "collectd-rome",
"services": {
"query": {
"list": {
"0": {
"query": "plugin: \"cpu\" AND plugin_instance: \"0\" AND host:\"rome\"",
"alias": "cpu1",
"color": "#7EB26D",
"id": 0,
<?php
// ========================
// = Plugin settings page =
// ========================
class ABC_Settings extends ABC_Core {
public function __construct()
{
@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;
@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 / 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 / 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 / postgresql.sql
Created August 1, 2013 12:09
postgresql.sql for the dbscripts folder of WSO2 Identity Server
CREATE TABLE IDN_BASE_TABLE (
PRODUCT_NAME VARCHAR(20),
PRIMARY KEY (PRODUCT_NAME)
);
INSERT INTO IDN_BASE_TABLE values ('WSO2 Identity Server');
CREATE TABLE IDN_OAUTH_CONSUMER_APPS (
CONSUMER_KEY VARCHAR(255),
CONSUMER_SECRET VARCHAR(512),
@ziodave
ziodave / cgminer.rb
Created April 3, 2013 06:00
cgminer formula that works on MacBook Pro.
require 'formula'
class Cgminer < Formula
homepage 'https://github.com/ckolivas/cgminer'
url 'https://github.com/ckolivas/cgminer/archive/v2.11.0.tar.gz'
sha1 '56f7d2bed9b51a3a9b6cafacb09c10de552f5e82'
version '2.11'
depends_on 'automake' => :build
depends_on 'curl'
@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
@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)
+