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
Option Explicit | |
Dim program | |
If WScript.Arguments.Count <= 0 Then | |
program = "CMD.EXE" | |
Else | |
program = WScript.Arguments(0) | |
End If | |
Dim argv : argv = "" | |
If WScript.Arguments.Count >= 1 then | |
Dim 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
var msvcrt = syscall.NewLazyDLL("msvcrt") | |
var memcpy = msvcrt.NewProc("memcpy") | |
func CGoBytes(p, length uintptr) []byte { | |
buffer := make([]byte, length) | |
memcpy.Call(uintptr(unsafe.Pointer(&buffer[0])), p, length) | |
return buffer | |
} | |
func CGoStringN(p, length uintptr) string { |
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
nyagos.bindkey("C-G", | |
function(this) | |
local curdir=nyagos.getwd() | |
nyagos.setenv("DOCHDIR",curdir) | |
nyagos.shellexecute('open', nyagos.exe,'',curdir) | |
end | |
) | |
local DOCHDIR=nyagos.getenv("DOCHDIR") | |
if DOCHDIR and string.len(DOCHDIR) > 0 then | |
nyagos.exec(string.format('cd ""%s""',DOCHDIR)) |
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 main | |
import "archive/zip" | |
import "fmt" | |
import "io" | |
import "os" | |
func main() { | |
if len(os.Args) < 2 { | |
return |
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
#include <string> | |
#include <map> | |
#include <iostream> | |
template <class C,class K,class V> | |
bool inline lookup(C &c,const K &k,V &v) | |
{ | |
v = c.find(k); return v != c.end(); | |
} |
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 main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
) | |
func main() { | |
for _, fname := range os.Args[1:] { |
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 main | |
import ( | |
"database/sql" | |
"fmt" | |
"os" | |
"strings" | |
_ "github.com/mattn/go-adodb" | |
) |
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
-- vim:set ft=lua: | |
local home = nyagos.getenv("HOME") or nyagos.getenv("USERPROFILE") | |
if nyagos.access(home .. "\\GoSrc\\nyagos\\Src\\.nyagos",0) then | |
loadfile(home .. "\\GoSrc\\nyagos\\Src\\.nyagos")() | |
end | |
addpath(home.."\\bin") | |
addpath(home.."\\Local\\go\\bin") | |
addpath "C:\\Program Files\\Mercurial" |
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
if exist "%TEMP%\Debug" del "%TEMP%\Debug\*.log" | |
if exist .git\rebase-merge rmdir /s .git\rebase-merge | |
for /R . %%I in (*~ svn-commit*.tmp *.orig *.stackdump) do del "%%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
@echo off | |
pushd "%~1" 2>nul | |
if not errorlevel 1 ( | |
popd | |
echo %~1 is directory | |
) else if exist "%~1" ( | |
echo %~1 is file | |
) else ( | |
echo %~1 does not exist. | |
) |