Skip to content

Instantly share code, notes, and snippets.

View nimezhu's full-sized avatar

Zhu Xiaopeng nimezhu

View GitHub Profile
@nimezhu
nimezhu / Caddyfile
Created December 21, 2021 18:58 — forked from ryanburnette/Caddyfile
Caddy v2.1 CORS whitelist
(cors) {
@origin{args.0} header Origin {args.0}
header @origin{args.0} Access-Control-Allow-Origin "{args.0}"
}
myawesomewebsite.com {
root * /srv/public/
file_server
header Access-Control-Allow-Methods "POST, GET, OPTIONS"
header Access-Control-Allow-Headers "*"
import cors https://member.myawesomewebsite.com
@nimezhu
nimezhu / index.html
Last active March 11, 2020 14:59
Welcome file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome file</title>
<link rel="stylesheet" href="https://stackedit.io/style.css" />
</head>
@nimezhu
nimezhu / index.html
Last active October 3, 2019 11:16
NB Dispatch Programmable Test
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>NB-Dispatch-Programmable</title>
<script src="https://vis.nucleome.org/static/lib/nb-dispatch.min.js"></script>
</head>
@nimezhu
nimezhu / README.md
Last active May 28, 2020 15:35
omero docker compose

OMERO-NB-Index

source env.sh
docke-compose up

need to create public user

create read-only public group

@nimezhu
nimezhu / cnb.user.js
Last active April 5, 2018 13:37
Nucleome Browser Plugin
// ==UserScript==
// @name Nucleome Browser Plugin
// @namespace http://genome.compbio.cs.cmu.edu:8080
// @version 0.0.4
// @description link nucleme browser with other genome browsers such as UCSC Genome Browser and WASHU Genome Browser. Works with NBrowser 'Browser Manager' Panel.
// @author xiaopeng.zhu(nimezhu@gmail.com)
// @include http://genome.ucsc.edu/cgi-bin/hgTracks*
// @include http://epigenomegateway.wustl.edu/browser/*
// @grant none
// @require https://d3js.org/d3.v5.min.js
gistup
@nimezhu
nimezhu / fs.go
Created September 21, 2017 19:34
package fs
//watch a directory rursively.
import (
"fmt"
"log"
"os"
"path/filepath"
// +build ignore
/*
* Minio Go Library for Amazon S3 Compatible Cloud Storage (C) 2015, 2016 Minio, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
chr1 249250621
chr2 243199373
chr3 198022430
chr4 191154276
chr5 180915260
chr6 171115067
chr7 159138663
chrX 155270560
chr8 146364022
chr9 141213431
#!/usr/bin/env sh
if [ "$#" -eq 1 ]; then
fn=$1
else
fn="${PWD##*/}"
fi
if [ ! -d dist ] ; then
mkdir dist
fi
if [ ! -d dist/linux ] ; then