Skip to content

Instantly share code, notes, and snippets.

View secunit64's full-sized avatar

Madhu Srinivasan secunit64

View GitHub Profile
@secunit64
secunit64 / command line shell
Created July 24, 2012 11:38 — forked from blakmatrix/command line shell
Getting Meteor wordplay up on nodejitsu/jitsu
meteor create --example wordplay
meteor bundle myapp.tgz
tar xzf myapp.tgz
cd bundle
(create package json with settings below)
jitsu databases create mongo <dbname>
(grab dbstring)
jitsu env set PORT 3000
jitsu env set MONGO_URL <dbstring>
jitsu deploy
@secunit64
secunit64 / makefile
Created May 2, 2012 07:46
Makefile for Latex
# $Id: makefile 11 2007-04-03 22:25:53Z jpeltier $
# This file seems to originate from something called 'the ultimate
# latex makefile' that different authors worked on. Find original
# versions at:
# http://tadek.pietraszek.org/blog/2006/03/24/the-ultimate-latex-makefile/
# (c) by Tadeusz Pietraszek
# http://www.acoustics.hut.fi/u/mairas/UltimateLatexMakefile/
# (c) by Matti Airas
#
# Call 'make dvi' for minimal compilation, to check for proper latex
@secunit64
secunit64 / html5-filesystem.jade
Created March 19, 2012 10:36
HTML5 Filesystem API usage- uses filerjs
///HTML5 Filesystem API
input(type="file", id="myfile", multiple)
script(id='myscript', type='text/javascript')
document.querySelector('#myfile').onchange = function(e){
//Open the FS, otherwise copy the files into the FS
if(filer && !filer.isOpen){
openFS(this.files);
} else {
importToFS(this.files);
}
@secunit64
secunit64 / backbone-links.md
Created March 6, 2012 10:17 — forked from beriberikix/backbone-links.md
AWSUM Web Development Linkz
@secunit64
secunit64 / Fullscreen API.js
Created February 2, 2012 19:59 — forked from robnyman/Fullscreen API.js
Fullscreen API
var docElm = document.documentElement;
if (docElm.requestFullscreen) {
docElm.requestFullscreen();
}
else if (docElm.mozRequestFullScreen) {
docElm.mozRequestFullScreen();
}
else if (docElm.webkitRequestFullScreen) {
docElm.webkitRequestFullScreen();
}
@secunit64
secunit64 / VB3-HowTo
Created January 19, 2012 05:42
Using VB3 to display hi-resolution videos on the wall
Since it is not possible to play a single 41MP movie on the AESOP display due to bandwidth issues, we split it up into one for each display. At this point we need a program that synchronises the play/pause actions across all the nodes and screens. For this purpose we use VB.3
First we need to define the CGLX default configuration so VB.2 knows the nodes, the screens on the nodes, the screens' details, ip addresses and port numbers required for playback. In this case we are using the AESOP display (zone 2 hence the usage of z2-csdefault.xml).
export CGLX_DEFAULT_CONF=/opt/kaust/config/cglx/z2-csdefault.xml
Now we launch VB.3 telling it that it will be displaying on 4 rows, and the folder containing the movies named in column, row order.
For example, we can name the files with the following format:
screen_<column>_<row>.avi
@secunit64
secunit64 / tile.sh
Created January 19, 2012 05:41
Tiling generator - used in conjunction with tiling.py
#!/bin/sh
if [ $# -ne 3 ]
then
echo "Error. $0 Needs 3 arguments."
echo "Please use: $0 <input_directory> <x_tiles> <y_tiles>"
exit
fi
i=0
@secunit64
secunit64 / tiling.py
Created January 19, 2012 05:40
Splitting a hi-resolution frame into subframes to fit Zone-2
# This script is designed to split up a frame 5440x30720 into 40 subframes 1360x768 to fit zone 2 (AESOP diplsay).
# Written by Chris Knox and Luca Passone.
import sys
import Image
import os
def split_on_nodes(filename):
'split a file up to fill the nodes of zone 2'
orig = Image.open(filename)
@secunit64
secunit64 / interlace.sh
Created January 19, 2012 05:38
Script to be used with interlace.py
#!/bin/sh
#This script needs to be used in conjuntion with interlace.py
#It will always do a "mkdir" on the output_directory, even if it exists. On most Unix systems it is fine.
if [ $# -ne 4 ]
then
echo "Error. $0 Needs 4 arguments."
echo "Please use: $0 <start_frame> <end_frame> <input_directory> <output_directory>"