Skip to content

Instantly share code, notes, and snippets.

View comtom's full-sized avatar

Tomás Dowling comtom

View GitHub Profile
@comtom
comtom / dropdown-example
Last active August 29, 2015 14:05
dropdown - ajax
/*
----------------------------
PARTIDOS
----------------------------
*/
// trae partidos segun el departamento
case 'partidos':
$departamento = (!empty($_GET['departamento'])) ? ms_escape_string($_GET['departamento']) : "0";
$sql = "SELECT distinct P.PARTIDO, P.DESCRIPCION
@comtom
comtom / show_sum
Created November 4, 2014 17:49
example call a routine and show the result
section .text
global _start ;must be declared for using gcc
_start: ;tell linker entry point
mov ecx,'4'
sub ecx, '0'
mov edx, '5'
sub edx, '0'
call sum ;call sum procedure
mov [res], eax
@comtom
comtom / CASA
Created December 3, 2014 15:15
//Ejercicio 2P2014-E02B;
// Dado un árbol n-ario de caracteres, determinar mediante
// una función si algún nodo formaba con sus hijos
// exactamente la palabra C A S A (en ese orden).
function busCasa(p:posicion; A:tArbol):boolean;
var
c: posicion;
casa: string;
# -*- coding: utf-8 -*-
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Tomas', 'tomas@comtomtech.com'),
)
MANAGERS = ADMINS
@comtom
comtom / Proxy Atom 1.0
Last active August 29, 2015 14:23
Configurar proxy en Atom 1.0
Configurar proxy en Atom 1.0
sistemas@webmaster /cygdrive/c/Users/sistemas/AppData/Local/atom/app-1.0.0/resources/app/apm/bin
$ ./apm.cmd config set https_proxy 'http://192.168.0.103:3128'
sistemas@webmaster /cygdrive/c/Users/sistemas/AppData/Local/atom/app-1.0.0/resources/app/apm/bin
$ ./apm.cmd config set http_proxy 'http://192.168.0.103:3128'
sistemas@webmaster /cygdrive/c/Users/sistemas/AppData/Local/atom/app-1.0.0/resources/app/apm/bin
$ ./apm.cmd config set proxy 'http://192.168.0.103:3128'
@comtom
comtom / ej10.asm
Last active November 2, 2015 21:56
format PE
entry main
section '.text' code readable executable
main:
push label_input
push _format_output
call [printf]
add esp, 8
format PE
entry main
section '.text' code readable executable
main:
push label_input
push _format_output
call [printf]
add esp, 8
format PE
entry main
section '.text' code readable executable
main:
mov eax, [esp]
xor edi, edi
; 32 bit -> 8 nibble
; valor inicial de la mascara
format PE
entry main
section '.text' code readable executable
main:
push str_intro
push format_output
call [printf]
<?php
if (! extension_loaded('mssql')) {
//Return an associative array. Used on mssql_fetch_array()'s result_type parameter.
define('MSSQL_ASSOC', '1');
//Return an array with numeric keys. Used on mssql_fetch_array()'s result_type parameter.
define('MSSQL_NUM', '2');
//Return an array with both numeric keys and keys with their field name. This is the default value for mssql_fetch_array()'s result_type parameter.
define('MSSQL_BOTH', '3');
//Indicates the 'TEXT' type in MSSQL, used by mssql_bind()'s type parameter.
define('SQLTEXT', '35');