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
// Polyfill so we can run this in Node.js as well | |
if (typeof atob !== 'function') { | |
var atob = a => Buffer.from(a, 'base64').toString('binary') | |
var btoa = b => Buffer.from(b).toString('base64'); | |
} | |
// 511 bytes after minify | |
var a=[ | |
["#1b6f3f", "#10c5b4", "#ade4cd", "#29ec19"], | |
["#96bde8", "#246a85", "#3483e4", "#b168f6"], |
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
/** | |
* Get the intersection points between a line segment and a rectangle with rounded corners. | |
* @param x0 The x-axis coordinate of the segment's starting point. | |
* @param y0 The y-axis coordinate of ththe segment's ending point. | |
* @param x1 The delta-x of the ray. | |
* @param y1 The delta-y of the ray. | |
* @param x The x-axis coordinate of the rectangle. | |
* @param y The y-axis coordinate of the rectangle. | |
* @param w The width of the rectangle. |
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
/** | |
* A linear interpolator for hex colors. | |
* | |
* Based on: | |
* https://gist.github.com/rosszurowski/67f04465c424a9bc0dae | |
* | |
* @param {Number} a (hex color start val) | |
* @param {Number} b (hex color end val) | |
* @param {Number} amount (the amount to fade from a to b) | |
* |
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, {Component, PropTypes} from 'react'; | |
const DEFAULT_STROKE_WIDTH = 0.15; | |
const DEFAULT_STROKE_COLOR = '#e1e1e1'; | |
/** | |
* SVGPath is an svg <path> element with utitlities | |
* | |
* @param {object[]} points - Array of Point objects - {x, y} - to plot this path | |
* @param {string} color - stroke color of path |
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
# coding=UTF-8 | |
from __future__ import division | |
import re | |
# This is a naive text summarization algorithm | |
# Created by Shlomi Babluki | |
# April, 2013 | |
class SummaryTool(object): |
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/env python | |
"""A Tornado example of RPC. | |
Designed to work with rpc_server.py as found in RabbitMQ Tutorial #6: | |
http://www.rabbitmq.com/tutorials/tutorial-six-python.html | |
Some code is borrowed from pika's tornado example. | |
""" |
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
/* | |
File: KeychainItemWrapper.h | |
Abstract: | |
Objective-C wrapper for accessing a single keychain item. | |
Version: 1.2 - ARCified | |
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple | |
Inc. ("Apple") in consideration of your agreement to the following | |
terms, and your use, installation, modification or redistribution of |
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/env python | |
#-*- coding:utf-8 -*- | |
from tweepy.streaming import StreamListener, Stream | |
from tweepy.auth import BasicAuthHandler | |
from tweepy.api import API | |
import tweepy | |
class MyStreamListener(StreamListener): | |
def __init__(self, api=None): |
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
[unix_http_server] | |
file=/tmp/supervisor.sock ; path to your socket file | |
[supervisord] | |
logfile=/var/log/supervisord/supervisord.log ; supervisord log file | |
logfile_maxbytes=50MB ; maximum size of logfile before rotation | |
logfile_backups=10 ; number of backed up logfiles | |
loglevel=error ; info, debug, warn, trace | |
pidfile=/var/run/supervisord.pid ; pidfile location | |
nodaemon=false ; run supervisord as a daemon |