Skip to content

Instantly share code, notes, and snippets.

@javadabadoo
javadabadoo / gist:d136fca7e9c617188728
Last active August 29, 2015 14:24
Continues upload/download files when getting SCP Broken Pipe
# resumes file downloading
rsync --partial --progress --rsh='ssh -p 1234' usr@host:/remote/from /local/to
# resumes file uploading
rsync --partial --progress --rsh='ssh -p 1234' /local/from usr@host:/remote/to
@javadabadoo
javadabadoo / jar_jdk_versions.sh
Created May 9, 2015 05:16
Gets JDK version used on each JAR file stored in $LIB_HOME
#!/bin/bash
LIB_HOME=/path/to/lib/*.jar
version['45.3']=1.1
version['46']=1.2
version['47']=1.3
version['48']=1.4
version['49']=5
version['50']=6
@javadabadoo
javadabadoo / PortScan.java
Created November 5, 2014 22:29
Port scan
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
public class PortScan {
public static void main(String... args) {
String host = args[0].equals("-") ? "localhost" : args[0];
int portStarting = Integer.parseInt(args[1]);
@javadabadoo
javadabadoo / formulario.sql
Created September 8, 2012 16:46
SCRIPT_CREACION_BD_ERIKA
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
CREATE DATABASE `formulario` DEFAULT CHARACTER SET utf8 ;
USE `formulario` ;
-- -----------------------------------------------------
-- Table `formulario`.`proyecto`
-- -----------------------------------------------------
@javadabadoo
javadabadoo / operadores
Created September 4, 2012 23:27
Demostracion de como funcionan los operadores logicos en Java
public static void main(String[] args) {
System.out.println("-- -- -- OR -- -- --");
if(bol(1, true) | bol(2, true));
System.out.println();
if(bol(1, false) | bol(2, false));
System.out.println("-- -- -- XOR -- -- --");
INTPUT:
http://algo/consulta?cosa=alguien
OUTPUT:
25625304d4ab6165fdee1f0c4c66fd58cb436544