Skip to content

Instantly share code, notes, and snippets.

View saden1's full-sized avatar

Sharmarke Aden saden1

View GitHub Profile
@saden1
saden1 / esm-package.md
Created July 14, 2023 20:31 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
/** input args:
1) https://github.com/JanusGraph/janusgraph/blob/master/janusgraph-examples/example-remotegraph/conf/jgex-remote.properties
2) https://github.com/JanusGraph/janusgraph/blob/master/janusgraph-dist/src/assembly/cfilter/conf/janusgraph-cassandra-configurationgraph.properties
** /
public static void main(String[] args) throws ConfigurationException {
JanusGraph janusgraph1;
JanusGraph janusgraph2;
Cluster cluster;
Client client;
@saden1
saden1 / gitflow-breakdown.md
Created July 26, 2019 15:45 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@saden1
saden1 / EmbeddedKafkaCluster.java
Created June 16, 2016 00:41 — forked from vmarcinko/EmbeddedKafkaCluster.java
Embedded Zookeeper & Kafka cluster
import kafka.server.KafkaConfig;
import kafka.server.KafkaServer;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Properties;
@saden1
saden1 / UndertowServer.java
Created December 26, 2015 18:22 — forked from vmarcinko/UndertowServer.java
Undertow-Spring MVC integration
package vmarcinko.undertow;
import io.undertow.Handlers;
import io.undertow.Undertow;
import io.undertow.server.HttpHandler;
import io.undertow.server.handlers.PathHandler;
import io.undertow.server.handlers.RedirectHandler;
import io.undertow.server.handlers.resource.FileResourceManager;
import io.undertow.servlet.Servlets;
import io.undertow.servlet.api.DeploymentInfo;
package net.stepniak.common.server.context;
import net.stepniak.common.server.util.ServerApiAuthorizationFilterImpl;
import net.stepniak.common.server.util.ServerApiOriginFilter;
import org.glassfish.jersey.server.ServerProperties;
import org.glassfish.jersey.server.spring.SpringWebApplicationInitializer;
import org.glassfish.jersey.servlet.ServletContainer;
import org.springframework.web.context.ContextLoaderListener;
import org.springframework.web.context.request.RequestContextListener;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;

Angular Dart Check List

The following shows what to watch out for when making Angular Dart applications. For more information about Angular Dart, see angulardart.org.

Table Of Contents

gremlin> g = TitanFactory.open("berkeleyje:/tmp/test")
==>titangraph[berkeleyje:/tmp/test]
gremlin> mgmt = g.getManagementSystem();
==>com.thinkaurelius.titan.graphdb.database.management.ManagementSystem@27c04377
gremlin> id = mgmt.makePropertyKey("uid").dataType(Long.class).make()
==>uid
gremlin> mgmt.buildIndex('byUID',Vertex.class).addKey(id).buildCompositeIndex()
==>com.thinkaurelius.titan.graphdb.database.management.TitanGraphIndexWrapper@14f3c6fc
gremlin> mgmt.commit()
gremlin> for (int i=0;i<200;i++) { v = g.addVertex([uid:(int)Math.floor(i/2)])}
@saden1
saden1 / hosts
Last active August 29, 2015 14:14 — forked from davestern/hosts
ec2-1-2-3-4.compute-1.amazonaws.com new_hostname=new-hostname.example.com
ec2-5-6-7-8.compute-1.amazonaws.com
@saden1
saden1 / raid.yml
Last active October 28, 2015 07:50 — forked from suprememoocow/raid.yml
- action: ec2_facts
- apt: pkg=lvm2 state=present
- apt: pkg=mdadm state=present
- pip: name=boto state=latest
- ec2_vol: instance="{{ hostvars[inventory_hostname]['ansible_ec2_instance-id'] }}"
volume_size=20
device_name="{{ item }}"