Skip to content

Instantly share code, notes, and snippets.

View cdiaz's full-sized avatar
🏠
Working from home

Cristiam Diaz cdiaz

🏠
Working from home
  • Quantux, @Noders
  • Florencia, Caquetá, Colombia
View GitHub Profile
@cdiaz
cdiaz / README.md
Last active April 30, 2017 01:02
Automation script to login into Chairá Platform from PowerShell

##Instructions:

####Download and Install Chocolatey (Package Manager for PowerShell) Run in the Command Line (cmd)

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

#####Other installation methods: https://github.com/chocolatey/choco/wiki/Installation

@cdiaz
cdiaz / TrmSoapClient.php
Created April 7, 2016 07:35
Obtener la tasa de cambio representativa del mercado para Colombia con PHP
<?php
$date = date("Y-m-d");
try {
$soap = new soapclient("https://www.superfinanciera.gov.co/SuperfinancieraWebServiceTRM/TCRMServicesWebService/TCRMServicesWebService?WSDL", array(
'soap_version' => SOAP_1_1,
'trace' => 1,
"location" => "http://www.superfinanciera.gov.co/SuperfinancieraWebServiceTRM/TCRMServicesWebService/TCRMServicesWebService",
));
@cdiaz
cdiaz / ConsultaNitRUES.js
Last active August 18, 2022 21:10
Consulta NIT en el Registro Único Empresarial y Social (RUES)
var request = require('request');
// Digite el NIT sin puntos ni guiones, el dígito de Verificación no es requerido.
request.post(
'http://www.rues.org.co/RUES_Web/Consultas/ConsultaNIT_json',
{ form: {strNIT: '891190346' } },
function (error, response, result) {
if (!error && response.statusCode == 200) {
console.log(result)
@cdiaz
cdiaz / TrmSoapClient.py
Last active July 17, 2023 21:16
Obtener La tasa de cambio representativa del mercado (TRM) para Colombia consumiendo el webservice de la Superintentencia Financiera desde Python
#!/usr/bin/env python
from suds.client import Client
import time
WSDL_URL = 'https://www.superfinanciera.gov.co/SuperfinancieraWebServiceTRM/TCRMServicesWebService/TCRMServicesWebService?WSDL'
date = time.strftime('%Y-%m-%d')
def trm(date):
try:
client = Client(WSDL_URL, location=WSDL_URL, faults=True)
@cdiaz
cdiaz / alien_translator.js
Created March 17, 2016 08:42
Alien Translator Javascript
var dictionary = ['miel', 'extraterrestre', 'al', 'automovil', 'auto', 'revestir'];
var alienPattern = 'zyxwvutsrqponmlkjihgfedcba';
function ordenar_extraterrestre(alienPattern, dictionary){
var humanPattern = 'abcdefghijklmnopqrstuvwxyz';
var translation = [];
for (var i in dictionary) {
var humanWord = dictionary[i];
var alienWord = '';