Skip to content

Instantly share code, notes, and snippets.

View coderjun's full-sized avatar

Jun Heider coderjun

View GitHub Profile
@coderjun
coderjun / mod_rewrite rules
Created July 24, 2014 19:11
Apache mod_rewrite - IP Multicast to Unicast Fallback
### Redirect to Unicast Live
### ========================
# Without case sensitivity rewrite requests with the following formats: /videoPlayer /videoPlayer/ /videoPlayer/{filename}.html
RewriteCond %{REQUEST_URI} ^/videoPlayer(/*|.*html)$ [NC]
# AND Without case sensitivity ignore requests with a URL that contains a query string that has src=rtmp://{whatever}/vod/{whatever}
RewriteCond %{QUERY_STRING} !src=rtmp://.*/vod/.* [NC]
# AND Make sure that the client is from the 10.1.10.x or 10.1.11.x subnet
@coderjun
coderjun / gist:1010895
Created June 6, 2011 19:25
RCSSyntaxASClassStructure.textile
RCS Syntax: AS Class Structure
@coderjun
coderjun / gist:1010891
Created June 6, 2011 19:25
RCSSyntaxMXMLClassStructure.textile
RCS Syntax: MXML Class Structure
protected function swing():String
{
var output:String;
_isMonkey? output = "From tree to tree" : output = "Swing Low Sweet Chariot";
return output;
}
@coderjun
coderjun / CodeSample.as
Created March 18, 2011 19:04
Description
package hello
{
public class HelloWorld
{
public var someVar:String;
public function someFunction():void
{
}

Variable Declarations – Don’t Use Fully Qualified Class Names

The general rule is to use import statements and not use fully qualified class names in variable declarations when typing the variable. There are two exceptions to this:

  • Exception1: If the variable name is identical to the class name
  • Exception2: If there are two Classes with the same name
@coderjun
coderjun / gist:873958
Created March 17, 2011 07:12
BigComponent (Public)
package com.csg.view.components
{
import mx.controls.AdvancedDataGrid;
public class BigComponent extends AdvancedDataGrid
{
public function BigComponent()
{
super();
}