so, launch those java programs with XMODIFIERS=
XMODIFIERS= java -Xmx512M -cp Minecraft.jar net.minecraft.LauncherFrame
XMODIFIERS= java -Xmx512M -cp Minecraft.jar net.minecraft.LauncherFrame
mv ~/Downloads/clang-2.8 ~/Downloads/llvm-2.8/tools/clang
cd ~/Downloads/llvm-2.8
./configure --prefix=~/opt/llvm
make -j 12
make install
cd ~/opt/llvm
ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ $HOME/opt/llvm/include
mv tags ~/.vim/tags/llvm
~/.vimrc
"au BufAdd,BufNewFile * nested tab sball
set tags+=~/.vim/tags/llvm
nmap <C-\> :tab split<CR>:normal evBy<CR>:exec "tag " . @"<CR>
curl -u admin:admin -F'foo=bar' -F'foo@TypeHint=String[]' http://localhost:8888/some/path
#!/bin/bash
if (( $# < 1 ))
then
echo "Creates /apps/sandbox/*"
echo "Usage: $0 project_name [host] [cred]"
echo "ex, $0 test-project localhost:4502 admin:admin"
exit 1
fi
name="$1"
host="localhost:4502"
cred="admin:admin"
if (( $# >= 2 ))
then
host="$2"
fi
if (( $# >= 3 ))
then
cred="$3"
fi
path="/apps/sandbox/$name"
left="http://${host}${path}"
category="sandbox.$name"
function createComponent() {
curl -s -u "$cred" \
-F'jcr:primaryType=cq:Component' \
-F"sling:resourceType=$path" \
"$left" > /dev/null 2>&1
}
function uploadJsp() {
curl -s -u "$cred" \
-T - "$left/html.jsp" > /dev/null 2>&1 <<HEREDOC
<%@include file="/libs/foundation/global.jsp"%>
<%@page import="com.day.cq.widget.HtmlLibraryManager"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>$path</title>
<%
final HtmlLibraryManager manager = sling.getService(HtmlLibraryManager.class);
if (manager != null) {
manager.writeCssInclude(slingRequest, out, "$category");
manager.writeJsInclude(slingRequest, out, "$category");
} else {
out.write("BAD");
}
%>
</head>
<body>
<h1>Sandbox $name</h1>
</body>
</html>
HEREDOC
}
function createWidget() {
curl -s -u "$cred" \
-F'jcr:primaryType=cq:ClientLibraryFolder' \
-F'sling:resourceType=widgets/clientlib' \
-F"categories=$category" \
-F'categories@TypeHint=String[]' \
-F'dependencies=cq.widgets' \
-F'dependencies@TypeHint=String[]' \
"$left/widgets" > /dev/null 2>&1
}
function uploadJsTxt() {
curl -s -u "$cred" \
-T - "$left/widgets/js.txt" > /dev/null 2>&1 <<HEREDOC
#base=source
script.js
HEREDOC
}
function createSource() {
curl -s -u "$cred" \
-F'jcr:primaryType=nt:folder' \
"$left/widgets/source" > /dev/null 2>&1
}
function uploadJs() {
curl -s -u "$cred" \
-T - "$left/widgets/source/script.js" > /dev/null 2>&1 <<HEREDOC
CQ.Ext.onReady(function() {
//entry point
CQ.Ext.Msg.alert('Sandbox $name', 'Hello World!');
});
HEREDOC
}
echo -n "creating cq:Component $path... "
createComponent || exit 1
echo "DONE"
echo -n "uploading html.jsp... "
uploadJsp || exit 1
echo "DONE"
echo -n "creating widgets... "
createWidget || exit 1
echo "DONE"
echo -n "uploading js.txt... "
uploadJsTxt || exit 1
echo "DONE"
echo -n "creating source directory... "
createSource || exit 1
echo "DONE"
echo -n "uploading script.js... "
uploadJs || exit 1
echo "DONE"
echo "You may visit: $left.html"
to install ats on windows, you need cygwin.
in cygwin you need:
then,
cd ats-x.x.x
./configure --prefix=/cygdrive/c/opt/ats
make
before make install
, you need to modify Makefile.
and in ~/.bashrc, you need something like:
OPT_DIR=/cygdrive/c/home/opt
export ATSHOME="${OPT_DIR}/ats/lib/ats-anairiats-0.2.2"
export ATSHOMERELOC="ATS-0.2.2"
export PATH="$ATSHOME/bin:$PATH"
and atscc is available
#!/bin/bash
LUA_HOME="$HOME/opt/lua"
LUA_PATH="$LUA_PATH;$LUA_HOME/?.lua" LUA_CPATH="$LUA_CPATH;$LUA_HOME/?.so" "$LUA_HOME/bin/lua" -lreadline -lcomplete $*
building llvm-2.6
For llvm 2.7,
svn checkout http://v8.googlecode.com/svn/trunk/ v8
-Werror
(maybe there's a way to disable it from command line) vim v8/SConstruct
cd v8
scons
g++ -Iinclude samples\shell.cc libv8.a -lwinmm -lws2_32 -o v8.exe
adds openconsole right click context:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\Folder\shell]
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\openconsole]
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\openconsole\command]
@="\"C:\\home\\opt\\Console2\\bin\\release\\Console.exe\" -d \"%L\""
adds openbash right click context (needs msys and Console2 tab named "Bash" where shell is set to C:\msys\1.0\bin\bash.exe
):
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\Folder\shell]
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\openbash]
[HKEY_CURRENT_USER\Software\Classes\Folder\shell\openbash\command]
@="\"C:\\home\\opt\\Console2\\bin\\release\\Console.exe\" -t Bash -d \"%L\""