Multi-series line chart rendered using React and D3.
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
'use strict'; | |
const autoprefixer = require('autoprefixer'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const path = require('path'); | |
const { | |
CheckerPlugin, | |
TsConfigPathsPlugin, | |
} = require('awesome-typescript-loader'); | |
const HappyPack = require('happypack'); |
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
.rounded-corners-gradient-borders { | |
width: 300px; | |
height: 80px; | |
border: double 4px transparent; | |
border-radius: 80px; | |
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff); | |
background-origin: border-box; | |
background-clip: padding-box, border-box; | |
} |
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
#!/bin/bash | |
brew install redis # Install Redis using Homebrew | |
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents # Enable Redis autostart | |
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist # Start Redis server via launchctl | |
# homebrew.mxcl.redis.plist contains reference to redis.conf file location: /usr/local/etc/redis.conf | |
redis-server /usr/local/etc/redis.conf # Start Redis server using configuration file, Ctrl+C to stop | |
redis-cli ping # Check if the Redis server is running |
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
import React, { PropTypes } from 'react'; | |
import { TransitionMotion, spring } from 'react-motion'; | |
/** | |
* One example of using react-motion (0.3.0) within react-router (v1.0.0-rc3). | |
* | |
* Usage is simple, and really only requires two things–both of which are | |
* injected into your app via react-router–pathname and children: | |
* | |
* <RouteTransition pathname={this.props.pathname}> |
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
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> | |
<script> | |
function check(){ | |
var species = $('#how_threatened_is').get(0).value; | |
species = species.replace(' ','-'); | |
$.ajax({ | |
dataType: "jsonp", | |
url: 'http://api.iucnredlist.org/index/species/'+species+".js", |