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
➋ (master) thiagoscalone@Atena:~/projects/cloudwalk/apps/main$ cloudwalk emulate -v | |
Emulating out/main/main.mrb | |
Emulating `out/main/main.mrb`... | |
CloudWalk CLI starting at 127.0.0.1:8080 | |
Please wait.2015-03-18 18:28:20.615 INFO Thrust Client:: Initializing | |
2015-03-18 18:28:20.616 INFO Attempting to start Thrust Core | |
2015-03-18 18:28:20.616 DEBUG CMD: /Users/thiagoscalone/.cloudwalk/vendor/darwin/x64/v0.7.5/Go Thrust.app/Contents/MacOS/Go Thrust | |
2015-03-18 18:28:20.617 INFO Thrust Core started. | |
2015-03-18 18:28:20.617 DEBUG Writing {"_id":1,"_action":"create","_type":"window","_method":"","_args":{"root_url":"http://localhost:8080/","title":"CloudWalk","size":{"width":400,"height":860},"position":{},"value":false,"cookie_store":false,"off_the_record":false,"fullscreen":false,"kiosk":false,"focus":false}} | |
--(Foo)++__THRUST_SHELL_BOUNDARY__++(Bar)-- |
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
# it's simple to solve, instead of this: | |
def sleep(seconds) | |
return unless seconds >= 1 | |
$device.timeout(seconds * 1000) do | |
$f.resume | |
end | |
Fiber.yield | |
end | |
# do this(I didn't test yet): |
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
module Kernel | |
def sleep(seconds) | |
# code ... | |
end | |
def usleep(microseconds) | |
# code ... | |
end | |
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
//VBOXSVR/v-root/pax/robot_rock/lib/tasks/../../lib/sdk/sdk/toolchains/arm-4.4.1/bin/arm-none-linux-gnueabi-gcc -O0 -g2 -Wall -funwind-tables -I//VBOXSVR/v-root/pax/robot_rock/lib/tasks/../../src -I//VBOXSVR/v-root/pax/robot_rock/lib/tasks/../../lib/mruby/include -I//VBOXSVR/v-root/pax/robot_rock/lib/tasks/../../lib/sdk/sdk/platforms/paxngfp_201205/include -I//VBOXSVR/v-root/pax/robot_rock/lib/tasks/../../lib/sdk/sdk/platforms/paxngfp_201205/include/freetype -I//VBOXSVR/v-root/pax/robot_rock/lib/tasks/../../lib/sdk/sdk/toolchains/arm-4.4.1/arm-none-linux-gnueabi/libc/usr/include -I//VBOXSVR/v-root/pax/robot_rock/lib/tasks/../../lib/sdk/emv src/debugger.c -c -o out/obj/debugger.o | |
//VBOXSVR/v-root/pax/robot_rock/lib/tasks/../../lib/sdk/sdk/toolchains/arm-4.4.1/bin/arm-none-linux-gnueabi-gcc -O0 -g2 -Wall -funwind-tables -I//VBOXSVR/v-root/pax/robot_rock/lib/tasks/../../src -I//VBOXSVR/v-root/pax/robot_rock/lib/tasks/../../lib/mruby/include -I//VBOXSVR/v-root/pax/robot_rock/lib/tasks/../../lib/sdk/sdk/platforms/ |
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
0000000: 5249 5445 3030 3032 99c8 0000 0079 4d41 RITE0002.....yMA | |
0000010: 545a 3030 3030 4952 4550 0000 005b 3030 TZ0000IREP...[00 | |
0000020: 3030 0000 004f 0001 0003 0000 0000 0007 00...O.......... | |
0000030: 0080 0006 0100 003d 0080 00a0 0080 0006 .......=........ | |
0000040: 0100 00bd 0080 00a0 0000 004a 0000 0002 ...........J.... | |
0000050: 0000 0854 4553 5432 3232 3200 0008 5445 ...TEST2222...TE | |
0000060: 5354 3131 3131 0000 0001 0004 7075 7473 ST1111......puts |
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
cp /Users/thiagoscalone/.rvm/gems/ruby-2.0.0-p247/bundler/gems/da_funk-e050c2fa8663/out/da_funk.mrb out/da_funk.mrb | |
cp /Users/thiagoscalone/.rvm/gems/ruby-2.0.0-p247/bundler/gems/walk-simplehttp-poc-c248924b5612/out/simplehttp.mrb out/simplehttp.mrb | |
mrbc -o ./out/main.mrb lib/global.rb lib/global_xml.rb lib/hash_xml.rb lib/main.rb lib/request.rb lib/test_platform.rb | |
mrbc -o ./out/test.mrb test/test_helper.rb test/unit/global_test.rb test/unit/global_xml_test.rb test/test_run.rb | |
mruby -b out/test.mrb | |
# Running tests: | |
................ |
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
yum groupinstall 'Development Tools' | |
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel ; | |
yum install -y make bzip2 autoconf automake libtool bison ; # libtool, automake, autoconf, bison required for ruby-head | |
yum install -y iconv-devel # NOTE: For centos >= 5.4 inconv-devel is provided by glibc | |
yum install readline-devel | |
yum install curl curl-devel | |
wget http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p353.tar.gz | |
tar xzvf ruby-2.0.0-p353.tar.gz | |
cd ruby-2.0.0-p353 |
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
int testSimple4(void) | |
{ | |
int i=0; | |
int mem=1000; | |
char *ptr; | |
char *newptr; | |
printf("\nbefore testSimple4"); | |
DelayMs(2000); | |
ptr = (char*)malloc(1000); |
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 <stdlib.h> | |
#define SIZE 1024 | |
static int (**hnew())[2] { | |
return calloc(sizeof(int**), SIZE); | |
} | |
static void hdel(int (**e)[2]) { | |
for (int i = 0; i < SIZE; i++) free(e[i]); free(e); | |
} | |
static int (**hget(int (**t)[2], int k))[2] { | |
for (int h = k & (SIZE - 1); **t && ***t != k; h = ((h + 1) & (SIZE - 1)), t += h); |
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 defined(__GNUC__) | |
// Ensure we get the 64-bit variants of the CRT's file I/O calls | |
#ifndef _FILE_OFFSET_BITS | |
#define _FILE_OFFSET_BITS 64 | |
#endif | |
#ifndef _LARGEFILE64_SOURCE | |
#define _LARGEFILE64_SOURCE 1 | |
#endif | |
#endif |