Skip to content

Instantly share code, notes, and snippets.

View cybersiddhu's full-sized avatar

Siddhartha Basu cybersiddhu

View GitHub Profile
var AppConstants = require('../constants/AppConstants.js');
var AppDispatcher = require('../dispatchers/AppDispatcher.js');
var api = require('../utils/api');
var ActionTypes = AppConstants.ActionTypes;
module.exports = {
create_customer: function(data){
api.customer.create(data);
}
#!/usr/bin/env python3
"""Backs up data-only volumes to host backup directory using rdiff-backup.
First create a Docker image containing rdiff-backup (named rdiff-backup)
Dockerfile:
FROM ubuntu:precise
RUN apt-get update && apt-install -qy rdiff-backup
``docker build -rm -t rdiff-backup .``
@danbri
danbri / README.md
Last active December 2, 2016 01:30
README.md

Using RDF NTriples data with Cayley Gremlin

Cayley can read graph data expressed in NTriples triples. This example shows NTriples that are in full W3C form. Basically this means using URLs for identifying types and properties, and using RDF vocabularies for specific types and properties.

This shows an example of some RDF data being converted to NTriples (a line-oriented format), merged and loaded. The examples assume you have the Redland Raptor RDF/XML parser installed; or some other way to generate NTriples. The merged triples (timbl-foaf-merged.nt) are attached here for those without an RDF/XML parser installed.

  1. Get some data (TimBL's FOAF contacts)

  2. his main foaf file (doesn't describe contacts)

@iand
iand / README.md
Created June 26, 2014 12:52
Getting started with Cayley
@bringking
bringking / gist:2a2f4469d8c60fe1a347
Last active November 21, 2017 00:54
Accordion control built with ReactJS and elierotenberg/react-animate
'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({
/**
@sethbergman
sethbergman / index.html
Last active February 16, 2018 01:29
Service Worker Demo
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
</head>
<body>
<h1>Hello world!</h1>
<script src="main.js"></script>
<!--<script src="worker.js"></script>-->
@fredrick
fredrick / App-example-test.js
Last active April 6, 2018 12:39
React Router Test Context Helper
var React = require('react/addons'),
TestUtils = React.addons.TestUtils,
TestContext = require('./TestContext'),
App = require('./App.jsx'),
app = TestContext.getRouterComponent(App);
describe('App', function() {
it('has something', function() {
expect(app.getDOMNode().textContent).toContain('something');
});
@noteed
noteed / docker-tinc.md
Last active April 17, 2019 06:22
Docker - Tinc setup
@Nek-
Nek- / main.ts
Created September 25, 2017 19:16
PixiJS & TypeScript & Webpack 3.5
import * as PIXI from 'pixi.js';
document.addEventListener('DOMContentLoaded', () => {
let renderer = PIXI.autoDetectRenderer(
600,
400,
{antialias: true, transparent: false, resolution: 1, backgroundColor: 0xFFFFFF}
);
}, false);
@brianmed
brianmed / datachannel.pl
Created October 10, 2013 23:40
WebRTC DataChannel two user chat. Signaling included using websockets.
#!/opt/perl
use Mojolicious::Lite;
use JSON;
get '/' => sub {
my $self = shift;
$self->render("index");
};