This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://stackoverflow.com/questions/19689715/what-is-the-best-way-to-detect-retina-support-on-a-device-using-javascript | |
import { ScreenSize } from "./types"; | |
export function isHighDensity() { | |
return ( | |
(window.matchMedia && | |
(window.matchMedia( | |
"only screen and (min-resolution: 124dpi), only screen and (min-resolution: 1.3dppx), only screen and (min-resolution: 48.8dpcm)" | |
).matches || |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Babel plugin to parse the AST and find where mixpanel events are called. | |
// This is used to generate the `mixpanel-report.json` file. | |
// https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md | |
const fs = require('fs'); | |
const _ = require('lodash'); | |
const OUTPUT_PATH = './build-external/mixpanel-report.json'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sourcemaps: ui-server/build-external/index.html | |
export SENTRY_AUTH_TOKEN=$$SENTRY_AUTH_TOKEN; \ | |
sentry-cli releases -o weaveworks -p service-ui new $(SHORT_HASH) && \ | |
sentry-cli releases -o weaveworks -p service-ui files $(SHORT_HASH) upload-sourcemaps ui-server/build-external/ --url-prefix '~/service-ui' && \ | |
rm -rf ui-server/build-external/*.js.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.form img { vertical-align: middle; } | |
.card-image-container { | |
float:left; | |
} | |
.card-image { | |
float:left; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Change to getNodeDetails to make this work. Returns a promise to allow for chaining | |
export function getNodeDetails(topologyUrlsById, currentTopologyId, options, nodeMap, dispatch) { | |
// get details for all opened nodes | |
const obj = nodeMap.last(); | |
if (obj && topologyUrlsById.has(obj.topologyId)) { | |
const topologyUrl = topologyUrlsById.get(obj.topologyId); | |
let urlComponents = [topologyUrl, '/', encodeURIComponent(obj.id)]; | |
if (currentTopologyId === obj.topologyId) { | |
// Only forward filters for nodes in the current topology | |
const optionsQuery = buildOptionsQuery(options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values. | |
# | |
# You can create a new snippet in this file by typing "snip" and then hitting | |
# tab. | |
# | |
# An example CoffeeScript snippet to expand log to console.log: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "react-base", | |
"version": "1.0.0", | |
"description": "staring point for react projects", | |
"main": "index.js", | |
"ci": { | |
"nvm": "4.1.0" | |
}, | |
"directories": { | |
"test": "test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
browserify: { | |
app: { | |
options: { | |
debug: false, | |
transform: ['reactify'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#wrapper { | |
width: 100%; | |
height: 700px; | |
margin: 0 auto; | |
} | |
#top { | |
background: #77ACF2; | |
border-radius: 10px; | |
width: 99%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
background: #f06; | |
table { | |
width: 900px; | |
background-color: #058; | |
} | |
.tr { | |
height: 20px; | |
width: 300px; |
NewerOlder