Skip to content

Instantly share code, notes, and snippets.

View huberflores's full-sized avatar

Huber Flores (El Magico) huberflores

View GitHub Profile
function get_Dalvik_Average_Time()
{
local result=0.0
local acumulador=0.0
for i in {1..10}
do
result=$(echo "scale=10; $(./rund.sh -cp markov.jar Markov)" | bc -q 2>/dev/null)
acumulador=$(echo "$acumulador + $result" | bc)
done
acumulador=$(echo "$acumulador/10.0" | bc)
/*
* @author: Huber Flores
*/
package ee.ut.cs.mobile.cloud.services;
import java.io.IOException;
import ee.ut.cs.mobile.cloud.core.Payload;
import ee.ut.cs.mobile.cloud.delegation.MobileTask;
@huberflores
huberflores / mochiweb-installation.as
Last active August 1, 2016 19:23
MochiWeb installation
/*
* author Huber Flores
*/
#MochiWeb - Erlang
#Getting started
#Start by getting a copy of MochiWeb using Git:
$ git clone git://github.com/mochi/mochiweb.git
@huberflores
huberflores / tsung-recorder_example.as
Last active December 27, 2015 08:58
Using tsung-recorder example
/*
* author Huber Flores
*/
#Tsung-recorder
#A tool that enables to record activities within a Web browser. Those activies can include filling forms, REST (GET/POST), user sessions, etc.
#Install Tsung as explained in https://gist.github.com/huberflores/2827890 (avoid this step if tsung is already installed)
#Install these dependecies if they are not installed.
/*
* author Huber Flores
*/
#This is a set of instruction to utilize the code offloading converter at https://github.com/huberflores/CodeOffloadingAnnotations.git
1) Clone the repository and built the tool using mvn install
2) Create an Android project with the code to offload. Annotated the required method to offload with "@Cloud"
for example
/*
* author Huber Flores
*/
Android-maven development environment.
-Requirements
1) Eclipse Juno with Eclipse Market Place
Help -> EclipseMarketPlace,
@huberflores
huberflores / dalvikvm.sh
Last active August 29, 2015 13:57
dalvikvm wrapper
#!/bin/sh
#This wrapper works with our Dalvik x86 image running in Amazon
#Please contact at huber AT ut DOT ee for granting access to the image
# base directory, at top of source tree; replace with absolute path
base=`pwd`
root=$base/out/host/linux-x86
export ANDROID_ROOT=$root
package symlab.ust.hk.abstract.profiler;
import java.lang.reflect.Method;
import java.util.Random;
/*
* author Huber Flores
*/
@huberflores
huberflores / Dalvik-x86-execution.txt
Last active October 1, 2016 16:30
Wrapping java code to dalvik code, and executing it using Dalvik x86
/*
* author Huber Flores
*/
#Wrapping a java class into dex.
#Remember to add "dex" command to .bashrc file so that you can call the command from any place
#dex is an utility that comes with the Android SKD, and it's located in .../android-linux-x86_64/sdk/platform-tools/
#export PATH=$PATH:/home/ubuntu/android-sdk-linux/platform-tools:/home/ubuntu/CyanogenModBuild/environment/bin
@huberflores
huberflores / github-quick-tutorial.tex
Last active December 2, 2015 15:41
GitHub quick and short tutorial
#
# author Huber Flores
#
# 1) Basic commands
$ cd yourrepo/
#file that contains instructions, licenses, etc.
$ touch README.md