Friday, April 17, 2020

The Video converter I needed

Handbrake it's an open-source video transcoder and a lifesaver! 
For people that don't have a lot of time for transcoding or don't know a lot about video. I was trying to get working an OGM file on my TV and the format was not recognized by it. It even wasn't visible by Plex that is a great server-client app for organizing video.
So I decided to convert those stupid files. 
The solution... Handbrake it was like magic! 

It let me:
  • Choose the format to convert the files
  • Select various types of files
  • Remove annoying audio tracks on the file
  • Add some subtitles 
  • Force subtitles that were necessary for the video.
So I give you the link for this miraculous and simple app that lets you work on all your videos at once.

https://handbrake.fr/rotation.php?file=HandBrake-1.3.1-x86_64-Win_GUI.exe

The web site for this guy is https://handbrake.fr/ go check it out.

HandBrake logo

I hate the PDF format

The other day I was trying to get a graphical novel from the web but the only format that I found was PDF. In some manner, I was sure it was all that I needed but the PDF format was messing with the images on my Kindle Paper White. 

The solution: Extract the images.
The problem: PDF.

The PDF format is crap because everyone it's trying to get a piece of the action behind it. So every extractor, converter, or creator costs money, it's freemium(for paying later), or it's a scam. I searched for an open-source way of dealing with it and I came across this tool. It was fantastic!

Pkpdfconverter lets you export text images or text and images. This is done in an elegant and simple way. The interface looks kind of old, but it deserves to be checked out.

Here is the link to the project in Sourceforge:

https://sourceforge.net/projects/pkpdfconverter/


Tuesday, March 17, 2020

How Ghost and Wordpress disappointed me

I embarked on a journey to find the perfect blogging platform for my technical writing. After extensive research, I narrowed down my choices to two popular options: Ghost and WordPress. Both platforms promised a seamless blogging experience with powerful features, but, unfortunately, they both fell short of my expectations in different ways.

Ghost: The Minimalist's Dream-Turned Nightmare

Ghost is often praised for its simplicity and speed. As a developer, I was drawn to its clean interface and markdown support. However, my experience quickly turned sour due to several key issues:

  1. Limited Customization: While Ghost's minimalist design is appealing, it comes at the cost of flexibility. Customizing themes and plugins required more effort than anticipated. The lack of a rich plugin ecosystem meant I had to write custom code for even basic features, which was time-consuming.
  2. Cost: Ghost's pricing model is subscription-based, which can be a significant expense for individual bloggers or small businesses. The cost of hosting Ghost on their official platform or self-hosting with proper infrastructure quickly added up, making it less appealing compared to other options.
  3. SEO Limitations: Despite its simplicity, Ghost lacked some essential SEO features out of the box. Implementing advanced SEO strategies required additional plugins or custom development, adding to the complexity and cost.


WordPress: The Jack of All Trades, Master of None

WordPress, on the other hand, is known for its versatility and extensive plugin ecosystem. It seemed like the perfect solution for any blogging need. However, my experience was marred by several frustrations:

  1. Performance Issues: WordPress sites can become sluggish, especially when loaded with multiple plugins and themes. Despite using various caching solutions and performance optimizations, I found it challenging to maintain a fast-loading site, which is crucial for user experience and SEO.
  2. Security Concerns: The vast number of plugins available for WordPress is both a blessing and a curse. Many plugins are poorly maintained or have security vulnerabilities, making WordPress sites a frequent target for hackers. Keeping the site secure required constant vigilance and updates.
  3. Complexity: While WordPress offers unparalleled flexibility, it also comes with a steep learning curve. Configuring and managing a WordPress site, especially for non-technical users, can be overwhelming. The admin interface is cluttered, and finding the right plugins and themes often felt like searching for a needle in a haystack.


In the end, both Ghost and WordPress had their strengths and weaknesses. Ghost's simplicity and speed were offset by its lack of customization and higher costs, while WordPress's versatility was hampered by performance issues, security concerns, and complexity. My experience with both platforms left me searching for a better solution that could strike the right balance between ease of use, customization, and performance.

I am still on the lookout for the perfect blogging platform that meets my technical needs without compromising on user experience and security. If you have any recommendations, I'd love to hear them!

Tuesday, December 18, 2018

Free DNS setup for a domain showing a Blogger web page


I was very busy with some configuration for a friend's blog on Blogger.
She was paying a fee for the DNS redirect from her national DNS service to blogger, and I help her to stop paying for that.

I'll write the steps to reproduce the free DNS setup via CloudFlare, that by the way its an excellent way to manage the DNS for free.

Step 1
In the first place, you need to add the domain to Cloudflare after creating an account in Cloudflare.
After that, we must provide the DNS of Cloudflare to our national domains service, usually, they are:

fred.ns.cloudflare.com
pola.ns.cloudflare.com

Step 2
The next step it's to locate the "configuration area" in Blogspot > Settings > Basic > Publishing >  Blog Address > "+ Set up a third-party URL for your blog - Point your own registered URL to your blog."

Step 3
In there is an input box for setting your domain URL including the subdomain www o blog or whatever... after you put it, it will throw an error and a description and link that downloads a text file that has all the information for upload to the DNS configuration in cloud flares the links says "DNS settings file", the content of the file looks something like this:


  • @ 3600 IN A 216.239.32.21
  • @ 3600 IN A 216.239.34.21
  • @ 3600 IN A 216.239.36.21
  • @ 3600 IN A 216.239.38.21
  • www 3600 IN CNAME ghs.google.com
  • 6n3klf7wtapc 3600 IN CNAME gv-3srif7ga7v6d4w.dv.googlehosted.com


This configuration shows to Blogger that you own the Domain and your point that domain from your DNS to Blogger.

Step 4
The importation of this config it made via a tool of Cloudflare in the tab DNS in DNS Records we look for the Advance button and after that, it will show a configuration panel with a button for Upload DNS File.

We select out just download DNS configuration file from Blogger and Cloudflare configures the DNS for us as Blogger wishes.

Step 5
Wait a while for DNS to deploy return to Blogger and insist on Step 3, it should now take the configuration of your domain and check that you own it. 

Step 6
In Blogger check on the checkbox that says Redirect from the domain alone to the domain with www or blog or whatever...

Step 5
In the same screen in Blogger check for HTTPS > HTTPS Availability and HTTPS Redirect. And put yes in both.

Step 5.1
And as an add-on, you can redirect in the Page Rules tab add the complete URL/Description of the domain and the redirect 301 that it's permanent to the URL with https and www.

NativeScript/Angular for dummies (practical guide)


Soo I begin to wonder what to write next and the response now that I know that Phone/Cordova it's a stinky pile of s... is clear to me now...

This is a thing that I'll surely regret try or write for in some years but let's begin with some easy tutorial for NativeScript.

The way I see it the only cool wat to see this is via the internal app for the playground of the team: Playground NAtivescrip Android for practically we will use Android because we all know that iOS sucks. First, let's install the CLI
npm install -g nativescript
The requirements for a full build of an app are here:
https://docs.nativescript.org/angular/start/quick-setup
Then we proceed to make a new app:
tns create HelloWorld --template tns-template-blank-ng
And for last we try to see our magnificent app in the preview panel:
tns preview
This will throw a QR code that we can scan with our playground app and the app will just pop up in the phone. Well, that's for now, a little guide to make a new app in NativeScript/Angular. See you next time.

Saturday, March 15, 2014

Making a scraper in Node.js...

Let's make a multi link crawler for a multi page query in a web page listing jobs opportunities.

First let's make a module of it, in a separate file from our server in node whatever it is and we gonna call it with

var worker = require('worker.js');

It will be called with this sentence from our express router or whatever you are using.

First we gonna need two libraries 

var request = require("request");
var cheerio = require("cheerio");

One for making requests more easy(request) and another for making jQuery available on the server side(cheerio).

Now we need the list of pages of the main web site, this one makes a default paged list with the jobs listed that day in in one link, and paginates on base of that link so...

var url = "http://www.bumeran.com.ar/empleos-publicacion-hoy.html";

Now for exporting this function to the node server we gona make a "start" function and export it.

In this example we gona make a request to the url of before and read the body with cheerio taking the 
number of pages of that list from the paginator in the bottom. 

Then we send that number of pages to the scraper function 

exports.start = function(req, res) {
    request(url, function() {
        return function(err, resp, body) {
            if (err && resp.statusCode == 200) {
                console.log(err); //throw err;
            }
            $ = cheerio.load(body);
            var pages = $(".paginador.box a:nth-last-child(2)").text().trim();
            console.log(pages); 
            scraper(pages);
        };
    });
};  

The function scraper must have the variable url by the number of page in this case it gona be:

var url = "http://www.bumeran.com.ar/empleos-publicacion-hoy-pagina-" + NUMBEROFPAGE + ".html";

The function scraper will only recive the number of pages from the scraping from before.

It will read every list in every page, and send specific links to the pages with the job descriptions to the scraperLinks function this process will be asynchronously by the nature of node.js. 

function scraper(pages) {
    for(var i = 0; i < pages ; i++){
        var url = "http://www.bumeran.com.ar/empleos-publicacion-hoy-pagina-" + (i + 1) + ".html";
        request(url, ( function(i) {
            return function(err, resp, body) {
                if (err && resp.statusCode == 200){
                  console.log(err); //throw err;
                }
                $ = cheerio.load(body);
                $(".aviso_box.aviso_listado").each(function(index, tr) {
                    console.log("Scrapping..." + $(this).attr("href")); 
                    scraperLinks($(this).attr("href"));
                });
            };
        })(i));
    }
}
NOTE: We are sending the value from "i" to the function as a value itself not a ref because it would not work as expected for the asynchronously way of work.


For last scraperLinks will get every link to a details page and get the info we need with plain jQuery:

function scraperLinks(link) {
            var url = "http://www.bumeran.com.ar" + link;
            request(url, function(err, resp, body) {
                    if (err && resp.statusCode == 200) { console.log(err); } //throw err;
                    $ = cheerio.load(body);            //console.log(body); 
                    var location = $('.aviso-resumen-datos tr td').last().text().trim(); // $('#.aviso-resumen-datos tr').last().find( "a" ).text();
                    var detail = $("#contenido_aviso p:nth-child(2)").text();//$("#contenido_aviso p").first().text();
                    var title = $(".box h2").first().text().trim();
                    var date = $(".aviso-resumen-datos tbody tr td").first().text().trim();
                    console.log("Saving..." + url); 
                    saveAd(url, location, detail, title, date);
                });
        }  

In this case we get title, date, and details from the published job, and send it to the saveAdd funtion that will recive the values and store them in any way posible. 

Well that's all 

Monday, July 1, 2013

The file conversion solution!

So... Last night, I was dealing with a stupid pdf file, this one in particularly was having a core data for a my next app, a perfectly well formed xls inside a stupid pdf file, the solution:

http://www.zamzar.com/

In seconds I was able to convert every file to xls, now the next problem after export the formatted xls to csv, was the conversion to json itself. That I resolve with this web app:

http://www.convertcsv.com/csv-to-json.htm

So the steps are various, but the effort its minimal.

Good luck with your conversions!

bye

The Video converter I needed

Handbrake it's an open-source video transcoder and a lifesaver!  For people that don't have a lot of time for transcoding or don...