Skip to content

Instantly share code, notes, and snippets.

View djnet00's full-sized avatar

Julián Mesa djnet00

View GitHub Profile
@djnet00
djnet00 / MappedTable.jsx
Last active August 2, 2022 22:34
React MappedTable
/*
Renders a table with rows dynamically created from an array of objects and a list of property names.
Use Object.keys(), Array.prototype.filter(), Array.prototype.includes() and Array.prototype.reduce()
to produce a filteredData array, containing all objects with the keys specified in propertyNames.
Render a <table> element with a set of columns equal to the amount of values in propertyNames.
Use Array.prototype.map to render each value in the propertyNames array as a <th> element.
Use Array.prototype.map to render each object in the filteredData array as a <tr> element,
containing a <td> for each key in the object.
@djnet00
djnet00 / print_zpl.php
Last active July 23, 2019 13:40 — forked from erighetto/print_zpl.php
Send raw ZPL to Zebra printer
<?php
/*
// OTHER OPTION
// ----------------------
// Put your ZPL code in a file e.g "barcode.zpl"
// Share your Zebra Printer, so that it can be accessed In Windows Explorer by typing
// e.g "\192.168.1.113[YOUR PRINTER NAME]";
// Create PHP File, and write code:
sudo su
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get autoremove
apt-get install ssh
shutdown -r now
sudo su
apt-get update
@djnet00
djnet00 / app.js
Created November 9, 2015 18:22 — forked from jgoux/app.js
Ionic / AngularJS service wrapper for Web SQL API / SQLite-Cordova-Plugin
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers'])
.run(function(DB) {
DB.init();
});
@djnet00
djnet00 / UISwiftRestDemo
Created October 27, 2015 02:26 — forked from cmoulton/UISwiftRestDemo
Quick & dirty REST API calls with Swift. See http://grokswift.com/simple-rest-with-swift/
// MARK: Using NSURLSession
// Get first post
let postEndpoint: String = "http://jsonplaceholder.typicode.com/posts/1"
guard let url = NSURL(string: postEndpoint) else {
print("Error: cannot create URL")
return
}
let urlRequest = NSURLRequest(URL: url)
@djnet00
djnet00 / README.md
Created October 25, 2015 05:46 — forked from lopezjurip/README.md
Write to NTFS on OSX Yosemite and El Capitan

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Update Homebrew formulae:

brew update
@djnet00
djnet00 / addsqlite.sh
Last active August 29, 2015 14:19 — forked from botris/addsqlite.sh
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git
{
"id": "641411508302",
"vendedor_id": "4",
"cliente_uid": "41441",
"cliente_sucursal_uid": "001",
"cliente_puntoenvio_uid": "000",
"cliente_clase": "C",
"mora": "0",
"visita_id": "1441411507716",
"fecha": "2014-09-23",
@djnet00
djnet00 / index.php
Created July 14, 2014 20:25
Eliminar saltos de linea
<?php
$cadena = "esto es un salto de linea\n con una tabulación\t";
$cadena = eregi_replace("[\n|\r|\n\r|\t|\0|\x0B]", "",$cadena);
echo $cadena;