Skip to content

Instantly share code, notes, and snippets.

@Fxe
Fxe / curation_example.java
Last active August 9, 2016 10:42
Curation
public class exampleService {
private IntegrationCurationDao curationDao;
private IntegrationMetadataDao metadataDao;
@Override
public void acceptMetaboliteCluster(IntegratedCluster integratedCluster, CurationSet xid, CurationUser usr) {
if (!integratedCluster.getClusterType().equals(
IntegrationNodeLabel.MetaboliteCluster.toString())) {
@Fxe
Fxe / biosynth_biodb_load.java
Created February 5, 2016 14:59
load external databases to central db
package pt.uminho.sysbio.biosynth.data.production;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Node;
@Fxe
Fxe / gist:1c9a673f6483da5b231f
Created February 3, 2016 16:43
Watson Maven
<distributionManagement>
<repository>
<id>watson</id>
<url>http://192.168.1.99/nexus/content/repositories/biosystems-releases</url>
</repository>
<snapshotRepository>
<id>watson</id>
<url>http://192.168.1.99/nexus/content/repositories/biosystems-snapshots</url>
</snapshotRepository>
</distributionManagement>
@Fxe
Fxe / nodejs
Created December 23, 2015 18:14
node.js init.d script for CentOS
#!/bin/sh
#
# chkconfig: 35 99 99
# description: Node.js /home/nodejs/sample/app.js
#
. /etc/rc.d/init.d/functions
USER="nodejs"
@Fxe
Fxe / redis-server
Created December 23, 2015 17:48 — forked from tessro/redis-server
A CentOS initscript for Redis
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid
@Fxe
Fxe / glpk-mip-sample.c
Created October 1, 2015 13:54 — forked from msakai/glpk-mip-sample.c
Sample for solving MIP (mixed integer programming) problem with GLPK
#include <stdlib.h>
#include <stdio.h>
#include <glpk.h>
/*
Maximize
obj: x1 + 2 x2 + 3 x3 + x4
Subject To
c1: - x1 + x2 + x3 + 10 x4 <= 20
c2: x1 - 3 x2 + x3 <= 30
@Fxe
Fxe / example.java
Last active August 29, 2015 14:27
KeggRest
package pt.uminho.sysbio.biosynth.chemsynth;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import pt.uminho.sysbio.biosynthframework.biodb.kegg.KeggCompoundMetaboliteEntity;
import pt.uminho.sysbio.biosynthframework.core.data.io.dao.biodb.kegg.AbstractRestfulKeggDao;
import pt.uminho.sysbio.biosynthframework.core.data.io.dao.biodb.kegg.RestKeggCompoundMetaboliteDaoImpl;
@Fxe
Fxe / logback.xml
Last active August 29, 2015 14:26
logback
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %M %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<!--
#include <stdio>
int main(int argc, char** argv) {
printf("Hello Gist !");
return 0;
}