Skip to content

Instantly share code, notes, and snippets.

View perezale's full-sized avatar

Alejandro Pérez perezale

View GitHub Profile
@anselmobattisti
anselmobattisti / gstreamer pipeline
Created September 10, 2019 23:37
Grab video from webcam and stream it using udpsink via x264
Pipeline to send video (simulating SRC) get the data from video0
gst-launch-1.0 v4l2src device=/dev/video0 \
! decodebin \
! x264enc \
! rtph264pay \
! udpsink host=localhost port=5000
// if you are running it inside a docker container be aware of the host ip in udpsink
gst-launch-1.0 v4l2src device=/dev/video0 \
! decodebin \
@vsudilov
vsudilov / gist:ba05178f31079957e855
Created May 12, 2014 18:09
filesystem over ssh tunnel through gateway (ssh+sshfs)
ssh -f -N -L 1233:remote.host:22 gateway.host
sshfs -p 1233 vsudilov@localhost:/nfs_mount /local/mountpoint -o reconnect
@shakyShane
shakyShane / Class.js
Created July 7, 2013 17:09
Javascript class-like inheritance
/* Simple JavaScript Inheritance for ES 5.1 ( includes polyfill for IE < 9 )
* based on http://ejohn.org/blog/simple-javascript-inheritance/
* (inspired by base2 and Prototype)
* MIT Licensed.
*/
(function (global) {
"use strict";
if (!Object.create) {
Object.create = (function () {
@dergemkr
dergemkr / streamview.html
Last active July 28, 2016 15:29
A basic HTML file for showing a web page with a full-screen view of a mjpg-streamer stream.
<html>
<head>
<title>Live Feed</title>
<script>
ASPECT_RATIO = 4.0 / 3.0;
IMAGE_SRC = "/?action=stream"
function initialize(){
var elem = document.getElementById("liveFeed")
var border = 0
@cobyism
cobyism / gh-pages-deploy.md
Last active May 3, 2024 19:07
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@klucar
klucar / ECEF2LLA.java
Last active December 28, 2022 20:46
Java stubs for converting ECEF (Earth Centered Earth Fixed) coords to Latitude Longitude Altitude
/*
*
* ECEF - Earth Centered Earth Fixed
*
* LLA - Lat Lon Alt
*
* ported from matlab code at
* https://gist.github.com/1536054
* and
* https://gist.github.com/1536056