Skip to content

Instantly share code, notes, and snippets.

View huberflores's full-sized avatar

Huber Flores (El Magico) huberflores

View GitHub Profile
@huberflores
huberflores / Energy
Created July 14, 2014 17:21
Moonson Power Meter Calculations
#
# @author Huber Flores
# source: http://electronicsclub.info/power.htm
#
#Calculate energy consumed from power
The amount of energy used depends on the power and the time:
<Energy = Power × Time>
@huberflores
huberflores / RandomExample.java
Created July 7, 2014 12:42
Quick random example in java
import java.util.*;
/*
* @author Huber Flores
*/
public class RandomDemo {
public static void main( String args[] ){
Random randomNo= new Random();
@huberflores
huberflores / jdk_tomcat_installation.as
Last active December 3, 2015 13:10
Installation of Tomcat along with the JDK
#
# author Huber Flores
#
###Download JDK latest version
Upload the files to the server
put /home/huber/setups/jdk-6u22-linux-i586.bin.zip /home/murakas/huber/software
put /home/huber/setups/apache-tomcat-7.0.4.tar.gz /home/murakas/huber/software
put /home/huber/setups/jdk-6u22-linux-x64.bin /home/murakas/huber/software
@huberflores
huberflores / common-linux-commands.as
Last active July 24, 2018 14:10
Common Linux commands
#
# author Huber Flores
#
#To upload files to remote server
$ scp -i /home/huber/Desktop/TechnicalInformation/HuberFlores/Ireland/pk-huber_flores.pem -r /home/huber/Desktop/code.zip ubuntu@ec2-xxx-xxx-xxx-xxx.eu-west-1.compute.amazonaws.com:/home/ubuntu/android-x86/
#To download files from remote server
$ scp -i /home/huber/Desktop/TechnicalInformation/HuberFlores/Ireland/pk-huber_flores.pem -r ubuntu@ec2-xxx-xxx-xxx-xxx.eu-west-1.compute.amazonaws.com:/home/ubuntu/android-x86/code.zip /home/huber/Desktop/code.zip
@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
@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
package symlab.ust.hk.abstract.profiler;
import java.lang.reflect.Method;
import java.util.Random;
/*
* author Huber Flores
*/
@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
/*
* author Huber Flores
*/
Android-maven development environment.
-Requirements
1) Eclipse Juno with Eclipse Market Place
Help -> EclipseMarketPlace,
/*
* 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