Skip to content

Instantly share code, notes, and snippets.

View debugpoint136's full-sized avatar

Deepak Purushotham debugpoint136

  • Washington University in St. Louis
  • St Louis
View GitHub Profile
scalar Date
enum VirusGenomeNodeType {
virus_genome
}
enum VirusGenomeDataType {
Complete_Genomic_Sequence
Complete_Genome
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"Date": {
"title": "Date",
"type": "GRAPHQL_SCALAR"
},
"VirusGenomeNodeType": {
"title": "VirusGenomeNodeType",
"type": "GRAPHQL_ENUM",
@debugpoint136
debugpoint136 / BedgraphTest.js
Last active May 2, 2019 21:26
React component to read remote files using @gmod/tabix
import React, {Component} from 'react';
const {TabixIndexedFile} = require('@gmod/tabix');
const {RemoteFile} = require('generic-filehandle');
const tbiIndexed = new TabixIndexedFile({
// filehandle: new RemoteFile('http://target.wustl.edu/ENCFF000ARO_ALL.iteres.loci.gz'),
// tbiFilehandle: new RemoteFile('http://target.wustl.edu/ENCFF000ARO_ALL.iteres.loci.gz.tbi')
/* with CORS */
filehandle: new RemoteFile('https://s3.amazonaws.com/repbr/TEST/ENCFF000ARO_ALL.iteres.loci.gz'),
tbiFilehandle: new RemoteFile('https://s3.amazonaws.com/repbr/TEST/ENCFF000ARO_ALL.iteres.loci.gz.tbi')
@debugpoint136
debugpoint136 / find_image_ID_digest.sh
Created February 26, 2018 17:55
Get latest Image ID for a repo from Docker Hub
#!/bin/bash
REPOSITORY=$1
TARGET_TAG=$2
# get authorization token
TOKEN=$(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:$REPOSITORY:pull" | jq -r .token)
# find all tags
ALL_TAGS=$(curl -s -H "Authorization: Bearer $TOKEN" https://index.docker.io/v2/$REPOSITORY/tags/list | jq -r .tags[])
@debugpoint136
debugpoint136 / 1.mongodb-aws-setup-guide.md
Created February 12, 2018 16:12 — forked from calvinh8/1.mongodb-aws-setup-guide.md
MongoDB Setup Guide for AWS EC2 Instances with Auth Enabled
@debugpoint136
debugpoint136 / draw3Dgenome.html
Created October 9, 2017 15:57
Quick code to draw a 3D genome
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>draw 3D genome</title>
</head>
<body>
<canvas id="draw" width="800" height="800"></canvas>
<script>
// open this HTML file in chrome, click your mouse and draw wavy lines
@debugpoint136
debugpoint136 / tictactoe.js
Created January 11, 2017 15:59
TicTacToe-React
function Square(props) {
return (
<button className="square" onClick={() => props.onClick()}>
{props.value}
</button>
);
}
class Board extends React.Component {
constructor() {
@debugpoint136
debugpoint136 / Tasks.js
Last active June 7, 2016 19:31
mongo CRUD
# insert
Tasks.insert({
text,
createdAt: new Date(), // current time
});
# Sort by Date
tasks: Tasks.find({}, { sort: { createdAt: -1 } }).fetch(),
# update
(function () {
/*jshint bitwise:false */
var i, random;
var uuid = '';
for (i = 0; i < 32; i++) {
random = Math.random() * 16 | 0;
if (i === 8 || i === 12 || i === 16 || i === 20) {
uuid += '-';
}
@debugpoint136
debugpoint136 / stream-toUpperCase.js
Created September 13, 2015 03:25
Convert data from `process.stdin` to upper-case data on `process.stdout`
var fs = require('fs');
var through = require('through2');
var tr = through(write, end);
function write (buffer, encoding, next) {
this.push(buffer.toString().toUpperCase());
next();
}