Skip to content

Instantly share code, notes, and snippets.

View xola139's full-sized avatar
🙂
always learning something

Raul Corona xola139

🙂
always learning something
View GitHub Profile
@xola139
xola139 / Exec Comand from Java
Created August 4, 2014 16:48
Simple exec comand para linux, Este función hace la ejecución de un comando linux regresando la respuesta colocándola en un List
String cmd = request.getParameter("cmd");
//System.out.println(cmd);
List<String> lst=new ArrayList();
Runtime run = Runtime.getRuntime();
Process p = null;
//String cmd = "pwd";
try {
p = run.exec(cmd);
@xola139
xola139 / Script Shell Linux .ksh
Last active August 29, 2015 14:05
Script para generar un shell desde linux , este esta probado para :-sh-4.1$ lsb_release -a LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 6.1 (Santiago) Release: 6.1 Codename: San…
#!/usr/bin/ksh
PATH=/usr/java/bin:$PATH
L=/var/Mylib
LOG=/tmp/logs
export PATH
CLASSPATH1=./NombreProyecto:./NombreProyecto/Myjar.jar:$L/log4j-1.2.16.jar:$L/gson-2.2.1.jar:$L/esper-4.6.0.jar:$L/commons-logging-1.1.3.jar:$L/cglib-nodep-2.2.jar:$L/banorte15.5.jar:$L/antlr-
@xola139
xola139 / Centrar div fixed
Created August 9, 2014 09:37
Centrar un div con jquery teniendo como position:fixed
$('#element').css({left:($(window).width() - $('#contenedorPrincipal').outerWidth())/2}
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-remote-database-to-optimize-site-performance-with-mysql
acceso remoto
tambien debe aplicar el comando em
mysql>GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'mozillamysql';
Si tengo este jqgrid
function dibujaGrid(idTabla, myControls, colNamesParam, colModelParam,
captionTitle, Width, Height, Filtro, Footer) {
// Grid para los eventos
jQuery("#" + idTabla).jqGrid({
datatype : "json",
scroll : true,
loadtext : 'Cargando...',
colNames : colNamesParam,
$('input[id^="HS_"]').click(function () {
var obj=$(this).attr('title');
if ($(this).prop('checked')) {
// checked
$("#myid").showCol(obj);
}else {
// Unchecked
$("#myid").hideCol(obj);
}
});
@xola139
xola139 / hidden div
Created September 23, 2014 15:02
visualizar en Hidden un div con jquery
//Dado un id de algun div este se utiliza la propiedad visibility para ocultar
$('#identificador').css('visibility', 'hidden');
//Similar al atributo visibility solo que este deja de utilizar el espacio
$('#identificador').css('display', 'none');
.contentNav> div
{
display: inline-block;
border: solid 1px #000;
}
<div id="container">
@xola139
xola139 / Update remote Github
Created October 10, 2014 23:16
Update remote Github
Uno a uno ir colocando esto en consola para actualizar el repositorio con nuevos archivos agregados al proyecto
git add .
git status
git commit -m "some message goes here"
git push origin master
@xola139
xola139 / gist:6f6f67050bf408fee259
Created October 24, 2014 18:56
Crear estructura tabla con select en SQL Server
select * into nueva_TAbla
from tabla_origen where 1=2