Skip to content

Instantly share code, notes, and snippets.

@danzeeeman
danzeeeman / gist:6214320
Created August 12, 2013 19:36
ffmpeg Raspberry Pi
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[rawvideo @ 0x1b28440] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from '/home/pi/openFrameworks/apps/myApps/omxCameraApp/bin/data/ofxvrpipe0':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: rawvideo, rgb24, 1280x720, 30 tbr, 30 tbn, 30 tbc
Incompatible pixel format 'rgb24' for codec 'mpeg4', auto-selecting format 'yuv420p'
[buffer @ 0x1b28e20] w:1280 h:720 pixfmt:rgb24
[avsink @ 0x1b289a0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x1b323a0] w:1280 h:720 fmt:rgb24 -> w:1280 h:720 fmt:yuv420p flags:0x4
@danomatika
danomatika / say-result
Last active December 19, 2015 06:19
small script for Mac OSX which speaks the result of a given command, useful for knowing when a long build is finished
#! /bin/bash
#
# say-result: speaks the result of a given command
# put this in a location that is added to the shell bin path
#
# usage: say-result [command & options]
#
# examples:
# say-result make
# say-result false
@jldeon
jldeon / triangle.c
Created May 2, 2013 20:36
Raspberry Pi Videocube modified files for demonstrating the flipping when proprietary tunnels are enabled.
/*
Copyright (c) 2012, Broadcom Europe Ltd
Copyright (c) 2012, OtherCrashOverride
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
@jvcleave
jvcleave / 55-primesense-usb.rules
Created March 4, 2013 00:58
RPI 55-primesense-usb.rules for Xtion pro
#rasbian turbo mode
# make primesense device mount with writing permissions (default is read only for unknown devices)
ATTRS{idProduct}=="0200",ATTRS{idVendor}=="1d27",MODE="666",GROUP="video"
ATTRS{idProduct}=="0300",ATTRS{idVendor}=="1d27",MODE="666",GROUP="video"
ATTRS{idProduct}=="0400",ATTRS{idVendor}=="1d27",MODE="666",GROUP="video"
ATTRS{idProduct}=="0500",ATTRS{idVendor}=="1d27",MODE="666",GROUP="video"
ATTRS{idProduct}=="0600",ATTRS{idVendor}=="1d27",MODE="666",GROUP="video"
ATTRS{idProduct}=="02ae",ATTRS{idVendor}=="045e",MODE="666",GROUP="video"
ATTRS{idProduct}=="02ad",ATTRS{idVendor}=="045e",MODE="666",GROUP="video"
ATTRS{idProduct}=="02b0",ATTRS{idVendor}=="045e",MODE="666",GROUP="video"
@chrisallick
chrisallick / gist:4693962
Created February 1, 2013 20:36
How day do dat? Pulling vine videos from twitter based on a hashtag. create the json request, bump the script tag with object into your dom, delete dom element, parse it.
result.entities.urls[0].expanded_urlfetch = function(query) {
var script_tag = document.createElement("script");
script_tag.id = "fetcher";
script_tag.src = "https://search.twitter.com/search.json"+query+"&callback=parse";
document.body.appendChild(script_tag);
}
parse = function(data) {
document.body.removeChild(document.getElementById("fetcher"));
if( data && data.results ) {
@mortennobel
mortennobel / GLError.cpp
Last active September 27, 2018 07:14
Simple error check of open gl (write readable error description to cerr stream including file name and line number)
#include "GLError.h"
#include <iostream>
#include <string>
#ifdef WIN32
# include <GL/glew.h>
#elif __APPLE__
# include <OpenGL/gl3.h>
#else
# include <GL3/gl3.h>
@jvcleave
jvcleave / distcc
Last active December 10, 2015 06:29
/etc/default/distcc
# Defaults for distcc initscript
# sourced by /etc/init.d/distcc
DISTCC_VERBOSE=1
DISTCC_FALLBACK=0
#
# should distcc be started on boot?
#
# STARTDISTCC="true"
STARTDISTCC="true"
@jvcleave
jvcleave / RPI install samba
Created December 11, 2012 21:44
RPI install samba
pi@raspberrypi ~ $ sudo apt-get install samba samba-common-bin
pi@raspberrypi ~ $ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.old
pi@raspberrypi ~ $ sudo rm /etc/samba/smb.conf
pi@raspberrypi ~ $ sudo nano /etc/samba/smb.conf
[global]
workgroup = HOME
netbios name = SAMBA
server string = Samba Server %v
map to guest = Bad User
@jvcleave
jvcleave / RPI pkgs
Last active October 13, 2015 20:47
RPI pkgs
//WHEEZY
sudo apt-get install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev gstreamer0.10-ffmpeg libglew-dev libopenal-dev libsndfile-dev libfreeimage-dev libcairo2-dev libgtk2.0-dev libjack-jackd2-dev python-lxml python-argparse portaudio19-dev alsa-utils git libopencv-dev avahi-daemon avahi-utils libavahi-compat-libdnssd-dev distcc libusb-1.0-0-dev samba samba-common-bin autoconf libtool cmake libmpg123-0 libmpg123-dev libjsoncpp-dev libfftw3-dev
//JESSIE
GTK_VERSION=-3
GSTREAMER_VERSION=1.0
sudo apt-get install libmpg123-dev alsa-base alsa-tools alsa-utils libupnp-dev automake cvs libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev libglew-dev libopenal-dev libsndfile-dev libfreeimage-dev libcairo2-dev libgtk2.0-dev python-lxml python-argparse libfreetyp
@beshkenadze
beshkenadze / 1_netatalk-3-install-on-debian-7
Last active October 13, 2015 13:38 — forked from vena/gist:2856490
Netatalk 3 installation procedure (Ubuntu 12.04.2 LTS/Debian 7)
$ tar xvf netatalk-3.0.5.tar.bz2
$ cd netatalk-3.0.5
$ ./configure \
--with-init-style=debian \
--with-cracklib \
--without-libevent \
--with-pam-confdir=/etc/pam.d \
--with-dbus-sysconf-dir=/etc/dbus-1/system.d
$ checkinstall --pkgname=netatalk-3.x --pkgversion="$(date +%Y%m%d%H%M)" --backup=no --deldoc=yes --default --fstrans=no