Skip to content

Instantly share code, notes, and snippets.

View cybersiddhu's full-sized avatar

Siddhartha Basu cybersiddhu

View GitHub Profile
var backendData = [
{
"title":"Section 1",
"content":"Our content for the section 1"
},
{
"title":"Section 2",
"content":"Our content for the section 2"
},
{
'use strict';
var React = require('react/addons');
var AnimateMixin = require('react-animate');
/**
* Accordion object that maintains a list of content containers and their collapsed or expanded state
* @type {*|Function}
*/
var Accordion = React.createClass({
/**
import React from 'react/addons';
const TestUtils = React.addons.TestUtils;
export default createComponent;
function createComponent(component, props, ...children) {
const shallowRenderer = TestUtils.createRenderer();
shallowRenderer.render(React.createElement(component, props, children.length > 1 ? children : children[0]));
return shallowRenderer.getRenderOutput();
}

Selectively applying path markers from a simple collection.

<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<script src="http://d3js.org/d3.v2.js"></script>
<style>
line.arrow {
stroke: #666;
@cybersiddhu
cybersiddhu / app.js
Created February 2, 2015 15:31
A simple express based nodejs proxy server
var express = require('express');
var path = require('path');
var morgan = require('morgan');
var proxy = require('proxy-middleware');
var url = require('url');
var os = require('os');
//app.get('/', function (req, res) {
//console.log(req.url);
//var options = {
use strict;
use LWP::UserAgent;
use URI::Escape;
use feature qw/say/;
my $query = <<'SPARQL';
PREFIX up_core:<http://purl.uniprot.org/core/>
PREFIX taxon:<http://purl.uniprot.org/taxonomy/>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
package ArrayPackage;
=pod
=head1 NAME
ArrayPackage -- A package class that uses perl array to store items
=cut