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> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" /> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" /> | |
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
<style> | |
h2 { | |
text-align: center; |
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
axios({ | |
url: 'http://localhost:5000/static/example.pdf', | |
method: 'GET', | |
responseType: 'blob', // important | |
}).then((response) => { | |
const url = window.URL.createObjectURL(new Blob([response.data])); | |
const link = document.createElement('a'); | |
link.href = url; | |
link.setAttribute('download', 'file.pdf'); | |
document.body.appendChild(link); |
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
// npm i -S request request-promise cheerio lodash | |
const request = require('request-promise'); | |
const cheerio = require('cheerio'); | |
const fs = require('fs'); | |
const _ = require('lodash'); | |
const projectName = 'enaqx/awesome-react'; | |
// const projectName = 'vuejs/awesome-vue'; | |
const url = `https://raw.githubusercontent.com/${projectName}/master/README.md`; |
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
FROM node:6 | |
WORKDIR /tmp | |
COPY . . | |
# RUN npm install -g execSync | |
RUN mkdir -p /opt/care/app \ | |
&& npm install --production |
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
export default function createReducer(INITIAL_STATE, handlers) { | |
return function reducer(state = INITIAL_STATE, action) { | |
if (handlers[action.type]) { | |
return handlers[action.type](state, action); | |
} | |
return state; | |
}; | |
} |
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
# Replace text in all files | |
sed -i -e "s/'actions'/'action-types'/g" ./src/**/**.js |
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
USERNAME | |
REGION | |
SEASON | |
killDeathRatio | |
winRatio | |
roundsPlayed | |
wins | |
losses | |
top10s |
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
FROM ubuntu:16.04 | |
ENV TSV=3.0.13.8 | |
RUN DEBIAN_FRONTEND=noninteractive \ | |
apt-get -y update && \ | |
apt-get -y install bzip2 && \ | |
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ | |
apt-get autoremove -y && \ | |
apt-get clean |
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 axios from 'axios'; | |
import {newNotification} from 'actions/notifications'; | |
import filterAxiosProps from './filter-axios-props'; | |
export const FETCH_API_ERROR = 'FETCH_API_ERROR'; | |
export const FETCH_API = 'FETCH_API'; | |
function checkIfItIsFunction(notification, response) { | |
if (typeof notification === 'function') { | |
return notification(response); |
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
#include <Adafruit_NeoPixel.h> | |
#include <LedControlMS.h> | |
// Serial | |
#define BAUDRATE 115200 | |
// NeoPixel Stick | |
#define NP_PIN 6 | |
#define NUM_LEDS 16 | |
#define NEO_MAX_BRIGHTNESS 32 |
OlderNewer