Skip to content

Instantly share code, notes, and snippets.

View jawsthegame's full-sized avatar

Tom Fleischer jawsthegame

View GitHub Profile
@jawsthegame
jawsthegame / vistar_example.cs
Created April 25, 2012 16:13
Examples for Vistar Media .Net Client
var adRequest = new AdRequest {
NetworkId = "YOUR_NETWORK_ID",
ApiKey = "YOUR_API_KEY",
DeviceId = "YOUR_DEVICE_ID",
NumberOfScreens = 1,
DirectConnection = false,
DisplayAreas = new List<DisplayArea> {
new DisplayArea{
Id = "YOUR_DISPLAY_AREA_ID",
Width = 1280,
package main
import (
"./msg"
"code.google.com/p/goprotobuf/proto"
"fmt"
"io/ioutil"
"log"
"net/http"
"time"
{"input":{"video_bitrate_in_kbps":731,"file_size_in_bytes":1389680,"md5_checksum":null,"channels":null,"total_bitrate_in_kbps":null,"video_codec":"wmv3","frame_rate":15.0,"width":600,"format":"asf","audio_codec":null,"audio_bitrate_in_kbps":null,"audio_sample_rate":null,"height":500,"duration_in_ms":14932,"id":27077597,"state":"finished"},"outputs":[{"video_bitrate_in_kbps":546,"file_size_in_bytes":1027457,"label":"mp4","md5_checksum":null,"thumbnails":[{"label":"thumbnail","images":[{"url":"http://transcodes.vistarmedia.com.s3.amazonaws.com/61ceb933-fa3e-4293-a64d-87578e335b44/thumb.png","format":"PNG","dimensions":"250x208","file_size_bytes":64719}]}],"channels":null,"total_bitrate_in_kbps":null,"video_codec":"h264","frame_rate":15.0,"width":576,"format":"mpeg4","url":"http://transcodes.vistarmedia.com.s3.amazonaws.com/61ceb933-fa3e-4293-a64d-87578e335b44/nMgzdNjzR5Syg_kWQyJwFw.mp4","audio_codec":null,"audio_bitrate_in_kbps":null,"audio_sample_rate":null,"height":480,"duration_in_ms":15000,"id":51740937,"st
#!/bin/bash
killall exchange || true
/usr/local/go/bin/go build -o exchange
screen -S exchange -p 0 -X stuff "./exchange -c sample-config.yaml`echo -en '\015'`"
def admin_required(func):
"""
Wraps a function to ensure that it's only viewable by logged in admins. If a
user is not logged in, it redirects to a login page with an acceptable error
message. If a user is logged in, but not a admin, it takes them to the root
page with an error.
"""
@wraps(func)
@login_required
0: Lease Exception
1: Lease Exception
2: Lease Exception
3: Lease Exception
4: Lease Exception
5: Lease Exception
6: Lease Exception
7: Lease Exception
8: Lease Exception
9: Lease Exception
object PublisherContext {
def apply(device: Device, network: Network): PublisherContext =
apply(network)
def apply(ntwrk: Network): PublisherContext = apply(ntwrk, None, None)
def apply(ntwrk: Network, index: Option[Int],
ven: Option[Venue]): PublisherContext = {
val gvtData = ven.flatMap(_.gvtData).getOrElse(ntwrk.gvtData)
class LeaseCombiner(Combiner):
def __init__(self, queue_dir, combine_dir):
Combiner.__init__(self, queue_dir, combine_dir, SpentLease)
BOUNCE ~-~-~-~-~-~-~
var printMap = function(map) {
map.setOptions({
mapTypeControl: false,
zoomControl: false,
streetViewControl: false,
panControl: false
});
var popUpAndPrint = function() {
dataUrl = [];