Skip to content

Instantly share code, notes, and snippets.

View joshkh's full-sized avatar

Joshua Heimbach joshkh

View GitHub Profile
imtables.configure('TableCell.PreviewTrigger', 'click')
@joshkh
joshkh / gist:87f5ed4bdbc575b9f199
Created June 23, 2015 13:32
Intermine Widgets 2.1.2
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test</title>
<link href="http://cdn.intermine.org/js/intermine/apps-c/list-widgets/2.1.2/app.bundle.prefixed.min.css" media="all" rel="stylesheet" type="text/css" />
<script src="http://cdn.intermine.org/js/intermine/apps-c/list-widgets/2.1.2/app.bundle.min.js"></script>
<script>
$(function() {
var W = require('list-widgets'),
widgets = new W({
@joshkh
joshkh / gist:74c0fa13f8f5ef8fbfe1
Created July 10, 2015 15:58
IMJS 3.14.0 query example
<!doctype html>
<html>
<head>
<script src="http://cdn.intermine.org/js/intermine/imjs/3.14.0/im.js"></script>
</head>
<body>
<script>
var flymine = new imjs.Service({root: 'www.flymine.org/query'});
var query = {
@joshkh
joshkh / gist:97039a5d024d5c374322
Last active August 29, 2015 14:25
Intermine: SO Term counts by gene
<!doctype html>
<html>
<head>
<script src="http://cdn.intermine.org/js/intermine/imjs/3.14.0/im.js"></script>
</head>
<body>
<script>
var mousemine = new imjs.Service({root: 'www.mousemine.org/mousemine'});
@joshkh
joshkh / gist:a563ca7d4f4f73e52c30
Created July 20, 2015 11:44
Intermine: Modify and run a template query.
<!doctype html>
<html>
<head>
<script src="http://cdn.intermine.org/js/intermine/imjs/3.14.0/im.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
</head>
<body>
<script>
var selector = '#some-elem';
var service = {root: 'http://localhost:8080/flymine/service/'};
<!doctype html>
<html>
<head>
<script src="http://cdn.intermine.org/js/intermine/imjs/3.14.0/im.js"></script>
</head>
<body>
request = require 'request'
imjs = require 'imjs'
class maintest
constructor: ->
console.log "maintest constructed"
post: ->
request.post 'http://httpbin.org/post', form: {key:'value'}, (err, res) ->
@joshkh
joshkh / IMJS 3.15.0-beta1.html
Last active September 29, 2015 12:08
IMJS 3.15.0-beta1 custom headers.
<!DOCTYPE html>
<html>
<head>
<script src="http://cdn-dev.intermine.org/js/intermine/imjs/3.15.0/im-3.15.0-beta1.js"></script>
</head>
<body>
<script>
var customHeaders = {
@joshkh
joshkh / IMJS 3.15.0-beta1-imtables.js
Created September 29, 2015 12:28
IMJS 3.15.0-beta1 with existing IMTables
var imtables = require('imtables');
var selector = '#some-elem';
var service = {root: 'https://apps.araport.org/thalemine/service/', headers: {'Authorization': 'SomeValue'}};
var query = {
"name": "Gene_Pathway_1",
"title": "Gene --> Pathway",
"comment": "Updated 6/28/2015 by Agnes",
"description": "Enter a list of genes to retrieve associated pathways.",
"from": "Gene",
(ns bluegenes.tools.faketool.core
(:require [re-frame.core :as re-frame]
[reagent.core :as reagent]
[clojure.string :as str]
[intermine.imjs :as imjs]))
(defn fetch-templates-handler [app-state]
(let [mine (js/imjs.Service. (clj->js {:root "www.flymine.org/query"}))
tpl-promise (-> mine .fetchTemplates)]