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 / 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 / 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 / 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 / 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 / gcmkeys.as
Last active August 29, 2015 14:06
Google Cloud Messaging Keys
#
# author Huber Flores
#
Go to: https://code.google.com/apis/console/
###Server
- API access
package ee.ut.cs.mc.exercise;
public class NQueens {
static int[] x;
public NQueens(int N) {
x = new int[N];
}
@huberflores
huberflores / R_Common_Commands.txt
Last active March 1, 2018 13:25
Common Commands to use in R
###DO NOT delete header###
#
# author Huber Flores
#
#clear screen
> command
Ctrl + l
>
@huberflores
huberflores / Uninstall-Linux-Software
Created November 11, 2014 23:15
Uninstall software in Linux
#
# author Huber Flores
#
#Instructions to Uninstall in Linux (Debian)
#use the utility "purge"
#Example
@huberflores
huberflores / CheckSumTest.java
Last active August 29, 2015 14:10
Checksum of a Java Object
package ee.ut.cs.mc.example;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Random;
@huberflores
huberflores / gnuplot_commands.as
Created December 10, 2014 00:46
Common Commands to use with gnuplot scripting
#
# author Huber Flores
#
> using 1:3
X Y1 Y2
1 10 100
2 20 200
...
#takes 1 as x axis, and 3 as y axis