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 ReactUpdates from 'react-dom/lib/ReactUpdates' | |
import ReactDefaultBatchingStrategy from 'react-dom/lib/ReactDefaultBatchingStrategy' | |
import 'isomorphic-fetch' | |
const logError = (err, extra = {}) => { | |
fetch('/logger', { | |
method: 'POST', | |
credentials: 'same-origin', | |
headers: { 'Content-Type': 'application/json' }, | |
body: JSON.stringify({ |
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
#!/usr/bin/python | |
''' | |
Script to count messages by user posted to a channel for a given date range. | |
Install: | |
# sudo pip install slackclient | |
Also you will need to obtain a slack API token: | |
https://api.slack.com/docs/oauth-test-tokens |
Creating an OAuth2 server is not a task that should be taken lightly. There are many security loopholes that could be exploited, and regular examinations are critical to handle possible vulnerabilities.
Auth is an authentication microservice based on the OAuth2 identity delegation protocol.
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
# run with a custom --n | |
# python run_luigi.py SquaredNumbers --local-scheduler --n 20 | |
import luigi | |
class PrintNumbers(luigi.Task): | |
n = luigi.IntParameter(default=10) | |
def requires(self): | |
return [] |
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
primary: | |
image: mongo:3.0 | |
volumes: | |
- ./p:/data | |
ports: | |
- "27017:27017" | |
# Our current version of docker-compose doesn't allow extra_hosts which would be the best way | |
# to add curcular dependency container links in this case. We cant upgrade docker-compose | |
# without upgrading docker to 1.7, and we can't do that without upgrading the kernel on our | |
# CentOS VM's. As such we are using the hostname hask below to allow primary and secondary |
Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112
For older versions of Spark and ipython, please, see also previous version of text.
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
/* | |
Setup: | |
npm install ws | |
Usage: | |
Create an API key in Rancher and start up with: | |
node socket.js address.of.rancher:8080 access_key secret_key project_id | |
*/ | |
var WebSocket = require('ws'); |
NewerOlder