Skip to content

Instantly share code, notes, and snippets.

View jacargentina's full-sized avatar

Javier Castro jacargentina

  • Nexion Software
  • Argentina
View GitHub Profile
@jacargentina
jacargentina / dbf2csv.sh
Last active June 27, 2019 14:28
Convert dbf to csv, with headings!
#!/bin/sh
if [ -z "$1" ]
then
echo "./dbf2csv [file.dbf]"
exit
fi
for var in "$@"
do
dbfdump.pl --info $var | csplit - 10 -s
@jacargentina
jacargentina / PHPSerializer.cs
Created March 7, 2018 17:16
C# deserialize php
/// <summary>
/// Serializer Class.
/// </summary>
public class PHPSerializer
{
//types:
// O = Object
// N = null
// s = string
// i = int
@jacargentina
jacargentina / convert-to-utf8.js
Created March 30, 2016 23:44
NodeJS: Convert any text file on disk encoding to UTF-8
var
fs = require('fs'),
charsetDetector = require('node-icu-charset-detector'),
iconvlite = require('iconv-lite');
/* Having different encodings
* on text files in a git repo
* but need to serve always on
* standard 'utf-8'
*/