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 / arduino.as
Last active December 12, 2015 12:39
Connecting Wifi module (Arduino Mega ADK) with Android
/*
* author Huber Flores
*/
### Getting Arduino ready for HTerm
# 1- Set your Wifi Shield to USB (It’s a small switch on you WiFi Shield).
# 2- Upload BareMinimum sketch to your Arduino ((File->Examples->Basic->BareMinimum).
# 3- Open HTerm.
### Connect with following settings
@huberflores
huberflores / ngnix.as
Last active December 13, 2015 17:59
Ngnix configuration
/*
* author Huber Flores
*/
### Ngnix configuration - Debian/Ubuntu 32 bits
# Notes:
# Ngnix cannot be used at the same time as Apache Web Server at port 80
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 / bluetooth1.dot
Last active December 27, 2015 01:33
social graph with graphivz
digraph Bluetooth {
graph [ dpi = 300 ];
p0-> p9;
p0-> p10;
p0-> p11;
p0-> p12;
p0-> p13;
p0-> p14;
p0-> p15;
p0-> p16;
@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.
@huberflores
huberflores / Maven-development.as
Last active January 20, 2016 14:15
maven fixes
#
# author Huber Flores
#
$ mvn install
#Build jar with dependencies
$ mvn assembly:assembly -DdescriptorId=jar-with-dependencies
@huberflores
huberflores / distfit.R
Created April 5, 2016 14:57
Fitting data to a particular distribution
suppressMessages(library(fitdistrplus))
suppressMessages(library(logspline))
fileInput <- "/Users/hflores/Desktop/datasets/code-benchmarking/output70-t2large.csv"
codebenchmark = read.csv(fileInput, sep=";")
time <- codebenchmark$response
descdist(time, discrete = FALSE)
@huberflores
huberflores / software-development.txt
Last active May 11, 2016 07:36
useful development links
#
# author Huber Flores
#
1- java bugs - http://bugs.java.com/
2- Ubuntu packages - https://packages.debian.org/wheezy/amd64/sysstat/download
3- Icon design apps - http://www.iconarchive.com/show/flatastic-8-icons-by-custom-icon-design.2.html
@huberflores
huberflores / openfire.as
Last active May 22, 2016 05:35
Installation and Configuration of Openfire 3.7.1
/*
* author Huber Flores
*/
# Openfire guide for Ubuntu 12.04 - 64 bits
# Dowload Openfire tar.gz version (openfire_3_7_1.tar.gz) (http://www.igniterealtime.org/downloads/index.jsp)
# Dowload Oracle JDK 6 SE and install
$ sudo aptitude update