This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
REM -- Redtamarin Windows Environment Setup | |
REM -- This will install the following: | |
REM -- 1) Cygwin | |
REM -- https://cygwin.com/ | |
REM -- 2) Cygwin Packages | |
REM -- bash,bash-completion,mintty,ncurses,which, | |
REM -- nano,wget,hostname,openssh | |
REM -- 3) apt-cyg - Cygwin Package Manager | |
REM -- https://github.com/transcode-open/apt-cyg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function follow_links() { | |
file="$1" | |
while [ -h "$file" ]; do | |
# On Mac OS, readlink -f doesn't work. | |
file="$(readlink "$file")" | |
done | |
echo "$file" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function follow_links() { | |
file="$1" | |
while [ -h "$file" ]; do | |
# On Mac OS, readlink -f doesn't work. | |
file="$(readlink "$file")" | |
done | |
echo "$file" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package nodeas.http | |
{ | |
public class HttpRequest | |
{ | |
private var _request:String; | |
public function HttpRequest():void | |
{ | |
super(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/as3shebang -- | |
import C.stdlib.*; // exit | |
import C.unistd.*; // sleep | |
var i:uint = 0; | |
function show():void | |
{ | |
trace( "hello", i ); | |
i++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/as3shebang -- | |
import shell.Program; | |
import shell.Runtime; | |
import flash.events.TimerEvent; | |
import flash.utils.Timer; | |
Program.atExit( function() { trace( "I'm out" ); } ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/as3shebang -- | |
import C.errno.*; // errno CError | |
import C.stdlib.*; // exit EXIT_SUCCESS EXIT_FAILURE system | |
import C.stdio.*; // remove | |
import C.unistd.*; // access F_OK | |
import C.sys.stat.*; | |
import shell.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/as3shebang -- | |
import flash.utils.*; | |
import shell.*; | |
function ansilib():* | |
{ | |
var hex:String = "10002e00000000990100054172726179066c656e6774680c616e73696c69622e617324310d656e636f"; | |
hex += "64696e672e616e736921687474703a2f2f61646f62652e636f6d2f4153332f323030362f6275696c74"; | |
hex += "696e05726573657406537472696e6716656e636f64696e672e616e73693a636f6e74726f6c73041b5b"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/as3shebang -- | |
import flash.utils.*; | |
import shell.*; | |
import C.stdlib.*; | |
/* NOTE: | |
how to embed binaries in plain text | |
in our case how to embed ABC libraries in shell scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/as3shebang -- | |
import C.stdlib.*; // getenv, exit, EXIT_SUCCESS, EXIT_FAILURE | |
import C.unistd.*; // access, X_OK, getlogin | |
import C.sys.stat.*; // stat, status, S_ISREG, S_IXUSR, S_IXGRP, S_IXOTH | |
/* NOTE: | |
Inside Bash scripts you often encounter | |
svn = ${`which svn`} | |
to get the full path of an executable |