Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>A simple clock</title> | |
| </head> | |
| <body translate="no" > |
A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.
Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).
| /* gcc gdk-gstappsrc-stream.c -Wall `pkg-config --cflags --libs gstreamer-app-0.10 gdk-pixbuf-2.0` -o gdkstream */ | |
| #include <gst/gst.h> | |
| #include <gst/app/gstappsrc.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <gdk-pixbuf/gdk-pixbuf.h> |
| #! /usr/bin/env python | |
| """ Convert an image (argv[1]) to an ANSI text string (xterm-256color) | |
| Original readme from colortrans.py follows: | |
| Nice long listing of all 256 colors and their codes. Useful for | |
| developing console color themes, or even script output schemes. | |
| Resources: |
| /* | |
| * tiny_IRremote | |
| * Version 0.2 July, 2016 | |
| * Christian D'Abrera | |
| * Fixed what was originally rather broken code from http://www.gammon.com.au/Arduino/ | |
| * ...itself based on work by Ken Shirriff. | |
| * | |
| * This code was tested for both sending and receiving IR on an ATtiny85 DIP-8 chip. | |
| * IMPORTANT: IRsend only works from PB4 ("pin 4" according to Arduino). You will need to | |
| * determine which physical pin this corresponds to for your chip, and connect your transmitter |
| #include <PubSubClient.h> | |
| #include <ESP8266WiFi.h> | |
| const char* ssid = "................."; | |
| const char* password = "................"; | |
| char* topic = "esp8266_arduino_out"; | |
| char* server = "iot.eclipse.org"; | |
| #!/bin/bash | |
| # Automatic install of Thingspeak server on Ubuntu 12.04 / Raspbmc / Debian (?) | |
| # Updated to use ruby 2.1.4 | |
| ## Install required packages | |
| sudo apt-get update | |
| sudo apt-get -y install build-essential git mysql-server mysql-client libmysqlclient-dev libxml2-dev libxslt-dev libssl-dev libsqlite3-dev | |
| ## Install ruby | |
| wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.4.tar.gz |
| # download latest libevent2 and tmux sources, and extract them somewhere | |
| # (thx bluejedi for tip on latest tmux URL) | |
| # | |
| # at the time of writing: | |
| # https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
| # http://sourceforge.net/projects/tmux/files/latest/download?source=files | |
| # | |
| # install deps | |
| yum install gcc kernel-devel make ncurses-devel |
| #include <gst/gst.h> | |
| static void | |
| fakesink_handoff (GstElement* object, GstBuffer* arg0, GstPad* arg1, gpointer data) | |
| { | |
| static gint cnt=0; | |
| GstElement *pipeline = GST_ELEMENT(data); | |
| (void)object; | |
| (void)arg0; | |
| (void)arg1; |