Last active
July 3, 2019 02:08
-
-
Save Likk/92c84643491849b5d210c931a1d84a80 to your computer and use it in GitHub Desktop.
Revisions
-
Likk revised this gist
Jul 2, 2019 . No changes.There are no files selected for viewing
-
Likk renamed this gist
Jul 2, 2019 . 1 changed file with 1 addition and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ package main import ( @@ -22,10 +21,4 @@ func init() { func main() { fmt.Println("This is Go world!!") } -
Likk created this gist
Jul 2, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ $ cat main.go package main import ( "fmt" "io/ioutil" ) const script = `<?php file_put_contents("php://stderr", "This is PHP world!!!".PHP_EOL); __halt_compiler(); #!perl #!ruby $Ruby="perl"; print "Hello, $Ruby World!!\n"; __END__ ` func init() { ioutil.Discard.Write([]byte(script)) } func main() { fmt.Println("This is Go world!!") } $ go build -o main ./main.go; $ ./main && ( perl -x ./main )&& ( ruby -x ./main) && (php ./main 2>&1 > /dev/null) This is Go world!! Hello, perl World!! Hello, $Ruby World!! This is PHP world!!!