Skip to content

Instantly share code, notes, and snippets.

Avatar

Edward Navarro EdwardNavarro

View GitHub Profile
@EdwardNavarro
EdwardNavarro / ConsultaNitRUES.js
Created Mar 27, 2019 — forked from cdiaz/ConsultaNitRUES.js
Consulta NIT en el Registro Único Empresarial y Social (RUES)
View ConsultaNitRUES.js
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)
@EdwardNavarro
EdwardNavarro / TrmSoapClient.php
Created Mar 27, 2019 — forked from cdiaz/TrmSoapClient.php
Obtener la tasa de cambio representativa del mercado para Colombia con PHP
View TrmSoapClient.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",
));
View catch-cf7-values.php
<?php
function contactform7_before_send_mail( $form_to_DB ) {
global $wpdb;
$form_to_DB = WPCF7_Submission::get_instance();
if ( $form_to_DB )
$formData = $form_to_DB->get_posted_data();
@EdwardNavarro
EdwardNavarro / 1_google_cloud_storage_backup_tutorial.md
Created Jul 21, 2018 — forked from rnwolf/1_google_cloud_storage_backup_tutorial.md
Tutorial shows how to make backups to Google Cloud Storage.
View 1_google_cloud_storage_backup_tutorial.md

Google Cloud Storage backup tutorial

Introduction

This tutorial shows how to make backups to Google Cloud Storage. The backups are:

  • automatic
  • stored off site
  • incremental
@EdwardNavarro
EdwardNavarro / storage.js
Created Mar 24, 2018 — forked from rohozhnikoff/storage.js
[react-native] wrapped AsyncStorage with JSON support
View storage.js
import { AsyncStorage } from 'react-native';
const JSONAsyncStorage = Object.assign({}, AsyncStorage, {
getItem() {
return AsyncStorage.getItem.apply(null, arguments).then((res) => JSON.parse(res));
},
setItem(key, value) {
return AsyncStorage.setItem(key, JSON.stringify(value))
}
});
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="https://fb.me/react-15.1.0.js"></script>
<script src="https://fb.me/react-dom-15.1.0.js"></script>
<style>
body {font-family:Fira code; font-size:13px;}
</style>
View keybase.md

Keybase proof

I hereby claim:

  • I am EdwardNavarro on github.
  • I am edwardnavarro (https://keybase.io/edwardnavarro) on keybase.
  • I have a public key whose fingerprint is C138 1080 A054 D1C9 DB47 669C 7014 26CA 35A8 D2E2

To claim this, I am signing this object:

View dataToFromWebViewTitanium.js
//Send data to webView in Titanium
var timeGraph = Ti.UI.createWebView({ url:'graphs/timeGraph.html', touchEnabled:true });
timeGraph.addEventListener('load', function(){
Ti.App.fireEvent('graphCareer', series);
});
<!-- Receive data in webView -->
<script type="text/javascript">
View linode-centos6-native-kernel.sh
### Starting from a Fresh CentOS 6.2 Linode
### Enable the native kernel to boot from pvgrub
### It will autoconfigure itself with each yum update.
### This is adapted from a previous script for CentOS 5.5 found here:
### http://library.linode.com/assets/542-centos5-native-kernel-selinux-enforcing.sh
### Provided via the linode wiki
### http://library.linode.com/linode-platform/custom-instances/pv-grub-howto#sph_centos-5
### Provided without warranty, although since it should only be run
### on first box build if your box gets broken simply rebuild it