View mirage-ami.sh
#!/bin/bash
#
# Shell script to register a new AMI from Mirage Unikernel into AWS (N.Virginia region)
# Developed by: Javier Sianes - jsianes@gmail.com
#
usage() {
echo "Incorrect parameters."
echo "Usage:"
echo ""
View ftp.c.patch
--- libncftp/ftp.c.orig 2009-10-23 23:31:22.000000000 +0000
+++ libncftp/ftp.c 2015-08-15 19:49:04.014889944 +0000
@@ -5,6 +5,73 @@
*
*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <curl/curl.h>
+#include <string.h>
View configure.patch
--- configure.orig 2011-02-02 23:17:19.000000000 +0000
+++ configure 2015-08-15 19:35:58.317989930 +0000
@@ -8,6 +8,10 @@
# gives unlimited permission to copy, distribute and modify it.
# Defaults:
+
+# adding libcurl libary
+CFLAGS="$CFLAGS -lcurl"
+
View ginfo.sh
#!/bin/bash
timestamp() {
TIMESTAMP=`date -u +"%Y-%m-%dT%H:%M:%S.000Z"`
}
line() {
echo "==================================================================================" >>${LOGFILE} 2>${ERROR}
echo "==================================================================================" >>${LOGFILE} 2>${ERROR}
}
sline() {
View keypair.sh
#!/bin/bash
#
# Developed by: Javier Sianes - jsianes@gmail.com
#
BITS="4096"
username(){
USERNAME=`echo ${USERNAME} | tr '[:upper:]' '[:lower:]' | sed 's/ /_/g'`
View ipassign
#!/bin/bash
# chkconfig: 2345 99 10
# description: Set Public IP from ElasticIP pool during instance startup
# processname: ipassign
# Provides: ipassign
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Set Public IP from ElasticIP pool during instance startup
View testELB.sh
#!/bin/bash
#
#
# Developed by: Javier Sianes - jsianes@gmail.com
#
# Shell script to test ELB request activity health
#
#
function on_exit()
View ReversedBinaryNumbers.java
import java.util.Scanner;
public class ReversedBinaryNumbers {
public static void main(String[] args) {
if (args.length == 1) {
Scanner scanner=new Scanner(args[0]);
if (scanner.hasNextLong()) {
long l=scanner.nextLong();
if ((l>0)&&(l<1000000001)) {System.out.println(Long.parseLong(new StringBuilder(Long.toBinaryString(l)).reverse().toString(),2));}
}
View LCAP.java
import java.io.*;
import java.util.*;
import java.text.*;
public class LCAP {
public static void Ley() {
System.out.printf("Evaluacion segun la LCAP:\n\n"+
"Articulo 85. Criterios para apreciar las ofertas desproporcionadas o temerarias en las\n"+
"subastas.- Se consideraran, en principio, desproporcionadas o temerarias las ofertas que\n"+
View backup-BBDD.sh
#!/bin/bash
#
# This script make a local MySQL DB backup
# Developed for RHEL5 by Javier Sianes - jsianes@gmail.com
#
# Start of Parameters
##############################################
USUARIO="username"
PASSWORD="password"