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.
@saden1
saden1 / gist:26497ffb2e3fd7e7078903cdfa330d28
Created February 1, 2020 03:47
janus graph test javascript
const { expect } = require('chai');
const gremlin = require('gremlin');
const { t, P, } = gremlin.process;
const { Graph } = gremlin.structure;
const { DriverRemoteConnection } = gremlin.driver;
const __ = gremlin.process.statics;
describe('Gremlin Test Suite', async () => {
let g;
let client;
let graph;
/** 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 / postgres.yaml
Created August 17, 2018 00:41
Complete Kubernetes Postgres DB Spec
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: postgres-pv
labels:
type: local
spec:
storageClassName: manual
capacity:
@saden1
saden1 / getversion.sh
Created February 10, 2018 17:28
Get maven artifact version
#/bin/bash
mvn -q org.codehaus.mojo:exec-maven-plugin:1.4.0:exec -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive
@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