Skip to content

Instantly share code, notes, and snippets.

View alejandrolechuga's full-sized avatar
🤯
Focusing

neptuno alejandrolechuga

🤯
Focusing
View GitHub Profile
<?php
ini_set("soap.wsdl_cache_enabled", "0");
ini_set("soap.wsdl_cache", "0");
ini_set("display_errors","On");
ini_set("track_errors","On");
class Soap
{
public $client;
public $login;
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<wsdl:definitions xmlns:esbns1="http://www.caliente.com.mx/ApuestaRemota" xmlns:esbns2="http://www.caliente.com.mx/ApuestaRemota" xmlns:esbns3="http://www.caliente.com.mx/ApuestaRemota" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://soa.jboss.org/Deportes" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://soa.jboss.org/Deportes">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.caliente.com.mx/ApuestaRemota" version="1.0">
<xs:include schemaLocation="http://gestor.caliente.com.mx:8080/ApuestaRemotaESB/ebws/Deportes/ListaDeportes?wsdl&resource=tipos/req-lista-deportes-type.xsd"/>
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.caliente.com.mx/ApuestaRemota" version="1.0">
<xs:include schemaLocation="http://gestor.caliente.com.mx:8080/ApuestaRemotaESB/ebws/Deportes
<!DOCTYPE>
<html>
<head>
<title>My page </title>
</head>
<body>
</body>
</html>
@alejandrolechuga
alejandrolechuga / dbMySQL.php
Created August 14, 2012 18:03
PHP MySQL handler Class
<?php
class DbMySQL {
private $host = DB_HOST;
private $user = DB_USER;
private $password = DB_PASSWORD;
private $database = DB_DATABASE;
private $linkId = null;
function connect () {
if ($this->linkId == 0)
@alejandrolechuga
alejandrolechuga / server.js
Created August 20, 2012 05:41
Hello World Node
var http = require("http");
http.createServer(function(request, response){
response.writeHead(200, {"Content-Type":"text/plain"});
response.write("hello world");
response.end();
}).listen(8888);
@alejandrolechuga
alejandrolechuga / maybe.js
Created August 21, 2012 00:24
What's the best way to compare two Javascript arrays and create a new array of only the matches?
var a = ["a","m"],
b = ["a","c","x","l","m"] ,
c = [], //array with matches
i = a.length,
j;
while(i--) {
j = b.length;
while (j--) {
if (b[j] == a[i]) {
@alejandrolechuga
alejandrolechuga / what.js
Created September 26, 2012 20:23
what.js
({}[{ toString: function x(){ ToString = x.caller; } }]);
delete ({}[{ toString: function x(){ DELETE = x.caller; } }]);
({ toString: function x(){ IN = x.caller; } } in {});
@alejandrolechuga
alejandrolechuga / tip1.js
Created October 11, 2012 20:47
Tip of the : Undeclared Variables
//Tip of the day
//Variable declaration
//Every declaration out of any scope becomes
//part of the global object like
var i = 0;
var j = 0;
var bar = function () {};
// A common JavaScript bug is with the undecleared variables in any scope they become part of the global object as well
@alejandrolechuga
alejandrolechuga / functionRegExp.js
Last active October 13, 2015 20:47
Gets the function argument names in an Array
function injector (objects) {
function functionArgsName(fn) {
var fragment;
fn = fn.toString();
//remove comments
fn = fn.replace(/(\/\*([\s\S]*?)\*\/)|(\/\/(.*)$)/gm,"");
fragment = fn.match(/function\s*\w*\s*\((.*?)\)/)[1];
if (!/^[\s]*$/g.test(fragment)) {
return fragment.replace(/(\s)/g,"").split(",");
/****
* Inmediate Function scopes the Application to prevent variable pollution
* @param: {Object} global , Reference of the global object
* @param: {Obejct} FWK , Custom framework
*/
;(function (global, FWK, Node) {
'use strict';
// Defining global constants for the app
FWK.const('RANGE_MINUTES' , 720); // Range minutes from 0 to 720