teleren/devto huggingface dataset:
Azure Blob’s Ghost Folders?
Tags: azure, blob, dotnet, core
Published: 2018-04-04 17:10:55

---
title: Azure Blob’s Ghost Folders?
published: true
tags: azure,blob,dotnet,core
canonical_url: 
---

This week I had to address a "upload image to blob" application that I had built in my development environment.  It was working fine, but it needed to be configured to work in production.  

## My Setup
For the application overall, I used [Azure Samples for Upload Image](https://github.com/Azure-Samples/storage-blob-upload-from-webapp/blob/master/ImageResizeWebApp/ImageResizeWebApp/Helpers/StorageHelper.cs) to Storage (built in .NET Core).  In it, the configuration in appsettings.json looks like this:

```#
      "AzureStorageConfig": {
        "AccountName": "",
        "AccountKey": "",
        "ImageContainer": "images",
        "ThumbnailContainer": "thumbnails"
    }
```

The Account Name and AccountKey are easily found in Azure Portal.  For container name, I used [Azure Storage Explorer](https://azure.microsoft.com/en-us/features/storage-explorer/), just so I could get a full look at the container and its blobs.  

## The Problem
The problem was, in my development environment I was uploading DIRECTLY to container.  In the example above, I was uploading to the “images” container.  In my Production environment, though, my ImagesContainer had two folders:
*  images/small 
*  images/large

I tried to change the “ImagesContainer”:”images” to:

* “ImagesContainer”:”images/small” 

and then

* “ImagesContainer”:”images\small” 

Still, I had no luck.  Requested URI not found.

## The Solution 
The folders you see are not *actual* folders, consider them sort of part of the file name with a folder delimiter of \,  _meaning you add the folder name to the front of the file name_.  

For example, the correct answer in the configuration above is:  

* “ImagesContainer”:”images”  

but, when I specify the file name in my code to upload, it would be:

* “small\mypic.jpg”  

This directs the file to the images container and then its own file name would direct it under what folder and file name to store it.   

Azure Storage is a bit odd sometimes, with its hierarchy and case-sensitive behavior, but once you are aware, it is quite easy to accommodate.

### Quick Tip
There is no leading “\” on that filename.  It simply should be:
*  “small\mypic.jpg”
Symfony Tutorial: Building a Blog (Part 3)
Tags: symfony, php, heroku
Published: 2018-03-23 17:41:22

---
title: Symfony Tutorial: Building a Blog (Part 3)
published: true
description: Learn how to create and deploy a secure blog engine with Symfony.
tags: #symfony #php #heroku
canonical_url: https://auth0.com/blog/symfony-tutorial-building-a-blog-part-3/
---

In this third article, you will be learning about deploying to two different environments: staging and production. You will be carrying this out by using two services, Heroku and Travis-CI.

[Read on ✊](https://auth0.com/blog/symfony-tutorial-building-a-blog-part-3/?utm_source=dev&utm_medium=sc&utm_campaign=symfony_blog)

![Symfony Tutorial: Building a Blog (Part 3)](https://thepracticaldev.s3.amazonaws.com/i/ruvy0x0dpshzd1lai3ea.png)
Beware of browser extensions that track you everywhere
Tags: webdev, security, browsers
Published: 2018-03-23 16:55:33

---
title: Beware of browser extensions that track you everywhere
published: true
description: I recently noticed a Chrome extension I had installed—A simple utility—was loading Mixpanel into every page I visited—whether or not I was using the extension.
tags: webdev, security, browsers
---

I recently noticed a Chrome extension I had installed—A simple utility—was loading Mixpanel into every page I visited—whether or not I was using the extension. Having published a popular Chrome extension in the past and receiving random solicitation from people offering to pay to track our traffic across the web, I know this is an industry.

This is an obvious threat to privacy and security, but also a threat to a pleasant browsing experience due to bogging down web pages. Both are terrible for the open web.

Take the time to be aware of the issues if you are not already paying attention.
Create ebook on the fly with php and pandoc
Tags: php, ebook, pandoc
Published: 2018-03-23 15:55:43

---
title: Create ebook on the fly with php and pandoc
published: true
description: Create ebook on the fly with php and pandoc
tags: php, ebook, pandoc
---

I'm digitalizing the Italian flora in the web site http://www.florae.it, but Internet is not everywhere so I produce and epub and I read it with Kobo ereader.

The trick is produce a text file formatted as Markdown

```md
#### Sp. Phalaris canariensis {#t2108}

[Gen. Phalaris](#t1624)

[Scheda aggiornata - Segnala osservazione](http://www.florae.it/?id=2108)

Pianta glabra (!). Culmi ascendenti, glabri, avvolti fino in alto dalle guaine (le sup. sono decisam. rigonfie). Fg. molli, con lamina larga fino a 9 mm e ligula tronca, breve, di 2(3-5) mm; guaine scabre se strisciate dal basso verso l'alto. Pannocchia spiciforme ovale, densa 1-2 X 2-4 cm; sp.tte inf. spesso sterili; glume 6-7(9) mm, biancastre con linee longi-tud. verdi; lemma fertile 4-6 mm, pubescente; lemmi sterili di 3 mm circa.<br /><br />Macarones.<br />In tutto il terr.: C, però nell'It. Sett. per lo più avvent. incostante.<br /><br /><strong>Usi</strong> - Origin. delle Canarie e Medit. Occid. viene comunem. coltivata come alimento per i canarini; con la pulizia delle gabbie i semi finiscono facilmente tra le immondizie e possono quivi germinare dando luogo a brevi avventiziati. Viene pure usata come pianta ornamentale.

![Diffusione](/home/caiofior/Scaricati/florae.it//images/merged_map/0/c/0c7433833c7e9841626ea999f5f152db.png)

**Autore**
:   Linneo

**Nome Italiano**
:   Scagliola comune

**Ciclo riproduttivo**
:   ☉ Annuale

**Altezza**
:   3-5(7) dm

![](/home/caiofior/Scaricati/florae.it//images/merged_altitude/2/7/277819b553a78e6b2c28d9c898b60ff8.png)
**Fioritura**
:   da Aprile a Giugno

![](/home/caiofior/Scaricati/florae.it//images/merged_flower/b/4/b427ebc8ffe2221831c49fa57369653e.png)
```
and than call (pandoc)[https://pandoc.org/] form php. Something like this:

```php
                    $cmd = 'pandoc --toc-depth=5 -t '.$format.' -f markdown+definition_lists+line_blocks -s -o '.$tempFileName.'.'.$format.' '.$tempFileName.' 2>&1';

                    $error = shell_exec($cmd);
                    unlink($tempFileName);
                    if (!is_file($tempFileName.'.'.$format)) {
                        throw new \Exception('Error on generating pandoc output with command '.$cmd.' '.$error,1509221630);
                    }
                    $fileName = $tempFileName.'.'.$format;
```
Where `$tempFileName` is the name of temporary Markdown file, `$format` is epub or other pandoc formats (doc, pdf, html) and `$fileName` the output file name.

At the moment I'm able to produce and epub of 150 Mb.
Sup.
Tags: introductions
Published: 2018-03-23 15:34:50

---
title: Sup.
published: true
description: 
tags: introductions
cover_image: https://thepracticaldev.s3.amazonaws.com/i/dv405e0lj0ynbbc9uv7q.png
---

I'm an ex-sysadmin who wandered into programming and is now falling behind the times working on legacy PHP systems.

I'm pleased to be here.

Cover image by [Tyler Lastovich](https://unsplash.com/@lastly) from [Unsplash](https://unsplash.com)
Has DEV.to started showing suggestions on who to follow during the signup process?
Tags: discuss, meta
Published: 2018-03-23 14:57:29

---
title: Has DEV.to started showing suggestions on who to follow during the signup process?
published: true
tags: discuss, meta
---

Today, I suddenly got 3 new followers, and I'm just wondering why. I noticed none of them have written anything or commented on ay post, so I'm speculating that they're new, and I'm somehow being suggested as a person to follow during their signup. Is thit true? Just curious.
3 Mistakes Developers Make that Prevent Them from Improving the Performance of Applications
Tags: code, 3mistakes, performance
Published: 2018-03-23 16:28:57

---
title: 3 Mistakes Developers Make that Prevent Them from Improving the Performance of Applications
published: true
tags: Code,3 mistakes,performance
canonical_url: http://www.elemarjr.com/en/2018/03/measure-measure-measure-the-importance-of-measuring-and-performance-metrics/
---

 ![](http://www.elemarjr.com/wp-content/uploads/2018/03/slip-up-danger-careless-slippery-300x200.jpg)

In these days, [performance is a feature](https://blog.codinghorror.com/performance-is-a-feature/)! So, you should start, right now, to refactor your code to achieve better performance. Right? No. you shouldn’t!

Before starting to change your code, take some time and think. Be sure you are not making one of the following mistakes.

## Mistake #1 – Do not define what is important

What do you mean by performance? Are you looking for better use of the CPU? Are you trying to reduce the latency (time to run a single operation from start to finish)? Throughput (number of operations your application can handle in a certain amount of time)? Do you need to reduce the amount of memory necessary to run? Are you interested in better disk usage? Do you want to reduce the network bandwidth required to transfer your data?

You need to define what aspects you are trying to improve. You need to be precise. The right moment is now!

## Mistake #2 – Try to optimize code without a reliable measurement

No matter how experienced you are, you should NOT rely on your gut feelings.

There are excellent tools that you could and should use. You will need accurate performance metrics to get your work done. Do NOT ignore this action.

Benchmarking is hard (especially micro-benchmarking). Do NOT try to be smart creating your tools.

## Mistake #3 – Do not verify the results

How do you know you succeed? The only way is measuring again and again.

One more time, no matter how experienced you are, you should NOT rely on your gut feelings.

Sometimes, to improve one aspect, you will make another worse. Double check if you are ready to handle the “improvement” consequences.

## Time To Action

Again, [performance is a feature](https://blog.codinghorror.com/performance-is-a-feature/). Take it seriously.

- Define your performance goals precisely
- Choose right performance metrics and select proper tools to provide them for you.
- Double check your results

I want to help you. Let’s [get in touch](http://www.elemarjr.com/en/contact/)! Subscribe my[mailing list](http://www.elemarjr.com/en/newsletter-subscription/).

O post [3 Mistakes Developers Make that Prevent Them from Improving the Performance of Applications](http://www.elemarjr.com/en/2018/03/measure-measure-measure-the-importance-of-measuring-and-performance-metrics/) apareceu primeiro em [Elemar JR](http://www.elemarjr.com/en).
Linux Network Commands Used In Network Troubleshooting
Tags: linux, beginners
Published: 2018-03-23 07:40:12

---
title: Linux Network Commands Used In Network Troubleshooting
published: true
description: 
tags: #linux #beginners
---
Once you have confirmed that the physical network is working, the next step is to troubleshoot your network and here we come to our topic which is Linux network commands and how to use them to troubleshoot your network.

1 Check Network Connectivity Using ping Command
2 Get DNS Records Using dig and host Commands
3 Diagnose Network Latency Using traceroute Command
4 mtr Command (Real-time Tracing)
5 Checking Connection Performance Using ss Command
6 Install and Use iftop Command For Traffic Monitoring
7 arp Command
8 Packet Analysis with tcpdump

https://likegeeks.com/linux-network-commands/

Hope you like it.
Regards,
Where do you store your apps flat file databases?
Tags: discuss, javascript, database, node
Published: 2018-03-23 06:53:47

---
title: Where do you store your apps flat file databases?
published: true
description: I've built a small app in node.js which uses a small json file to store data. Where on the file system should this be placed to ensure some level of persistence?
tags: discuss, javascript, database, node.js
---

Hi All,

I've built a small node.js application which uses a local JSON file to persist data across restarts (nedb npm package for reference). I currently have this file set in my .gitignore and it is simply held within a Database folder in my project.

I'm using ansible to deploy my program to my production server, which will pull down the latest remote git repo and run the install/build and startup. I'm starting to wonder however where a sensible place would be to store the JSON file that is created upon first start up of the application.

Does storing it WITHIN the project folders make sense? I have noticed a few developers, especially on ubuntu save it to the users home directory and sometimes even as a hidden folder e.g. /home/user/.app/database.json

What is best practice in this case? My only worry is that potentially that project folder could get deleted, for whatever reason maybe to do a complete fresh install, but I would always like to keep the database file intact.

Happy for thoughts and discussions on this as I think people tend to do this in lots of different ways.
Java 9 Flow API
Tags: java, reactive, flowapi
Published: 2018-03-23 04:45:36

---
title: Java 9 Flow API
published: true
description: Getting started with Java 9 Flow API.
tags: java, reactive, flowAPI
---
#Java 9 Flow API
Flow API is Java's official support for [Reactive Streams Specification](http://www.reactive-streams.org/). It is a combination of both Iterator(Pull) and Observer(Push) patterns.

**The Flow API is an inter operation specification and not an end-user API like [RxJava](https://github.com/ReactiveX/RxJava).**

If you are a developer(even an outdated one :D), you must have surely heard about reactive-streams, non blocking IO, asynchronous calls, etc. 
####So why Reactive?
Consider it as a secretary in a office - 
 - If they **makes you wait** for meeting their boss - that's normal way.
 - If they asks you to **go do something else** and they contact you when their boss is free for meeting - that's the reactive way.

People generally tend to think any reactive programming as improvement in speed, but it is not true. Considering both scenarios above you have to spend equal time for meeting her boss (so no improvement in speed), but you can be more productive in the second approach.

**Reactive programming increases scalability and stability but not speed.**

###Flow API
Flow API consists of 4 basic interfaces - 
 - Subscriber - The Subscriber subscribes to the Publisher for the callbacks.

{% gist https://gist.github.com/Ajitesh-Tiwari/21400fda0e0f7613a684793830ca79ec %}

 - Publisher - The publisher publishes the stream of data items to the registered subscribers.

{% gist https://gist.github.com/Ajitesh-Tiwari/b530c2607065488292adedb690aa73eb %}

 - Subscription - Link between publisher and subscriber.

{% gist https://gist.github.com/Ajitesh-Tiwari/6ba418fc618c5d22a7f5ec52c842bc4e %}

 - Processor - The processor sits between the Publisher and Subscriber, and transforms one stream to another.

{% gist https://gist.github.com/Ajitesh-Tiwari/81f90ca0b7917379c4eeb5c7f8dcdc36 %}

####Now it's time for some hands-on with our new Flow API
Let's create a basic subscriber which **asks for one data object, prints it and asks for one more.**

{% gist https://gist.github.com/Ajitesh-Tiwari/bfab178ce7a868a5987b56b50ef43798 %}

Now let's quickly use a publisher implementation provided by Java (**SubmissionPublisher**) to complete our session.

{% gist https://gist.github.com/Ajitesh-Tiwari/450b0d29d3a1d62d17c1fb5a77ce2a03 %}

And here is our sweet output - 

![Output.gif https://media.giphy.com/media/Ok2j8YLq9PeQoM2wMg/giphy.gif](https://media.giphy.com/media/Ok2j8YLq9PeQoM2wMg/giphy.gif)

Here you can easily see how the submit(T item) function of publisher invokes onNext(T item) function of subscriber. 

But it wouldn't have been possible without request(long n) function of the subscription.

The delay of 1 sec helps us see the reactive magic happening. Although it's no magic, just some code written by really smart people.

####[Source Code](https://github.com/Ajitesh-Tiwari/Java-Flow-API)
Python as a daemon?
Tags: python, devops, ask, discuss
Published: 2018-03-23 00:17:21

---
title: Python as a daemon?
published: true
description: what is your thoughts on python as a daemon?
tags: Python,devops,ask,discuss
---

I have a unique situation where I need to run a daemon that will interact with Salt and Docker, naturally my thought process is Python, however I’m not sure if Python is the best case or something like C or Go is better?

It doesn’t need to be cross platform, strictly is responsible for syncing up our CDN and software repositories

Thoughts?
Zotero reMarkable sync
Tags: zotero, remarkable, heroku
Published: 2018-07-31 01:53:57

---
title: Zotero reMarkable sync
published: true
tags: zotero, remarkable, heroku
canonical_url: https://michael.mior.ca/blog/zotero-remarkable-sync/
---

I’ve really been enjoying my [reMarkable](https://remarkable.com/) tablet the past several months. (I wrote [a short review](https://dev.to/michaelmior/remarkable-review-apc) last year if you care to see a few more details). One of the biggest gripes I have about the device is that it can be a pain to get documents on it. There’s currently no web app so the only choice is desktop apps for Windows and macOS or a mobile app for Android. Once I saw someone had released a [reMarkable API](https://github.com/splitbrain/ReMarkableAPI) on GitHub, I knew I would have to find some way to ease my pain.

I use [Zotero](https://www.zotero.org/) to manage my paper references and unsurprisingly, reading papers is one of the primary uses of my reMarkable. I decided to figure out a way I could have new papers I wanted to read in Zotero show up on my reMarkable. Using the reMarkable and Zotero APIs, this proved to be a fairly straightforward weekend project. You can find the result [on GitHub](https://github.com/michaelmior/zotero-remarkable).

To get started, there are simply a few environment variables that need to be set which are detailed in the README. Then once the script is run, it will look for items in a Zotero collection, download their attachments, and upload them to the reMarkable API. Putting this script into a cron job means that my papers are now synchronized regularly. I’m currently hosting this for myself for free on Heroku using the [scheduler add-on](https://devcenter.heroku.com/articles/scheduler) to run the job. I disabled any web process (`heroku ps:scale web=0`) so the only thing that runs is the cron job. Since the cron job is quite quick to run, it falls well within the free usage limits of Heroku.

I may decide to add a [Heroku button](https://devcenter.heroku.com/articles/heroku-button) to the repository in the future, but it’s fairly straightforward to configure manually. Just set the required environment variables, disable the web dyno, and set up the cron job with the scheduler. Hope this ends up being useful to someone else!
Structural Problems With For-Profit Social Media
Tags: technology, policy, privacy, leadership
Published: 2019-01-29 11:53:08

---
title: Structural Problems With For-Profit Social Media
published: true
tags: technology,policy,privacy,leadership
canonical_url: https://www.danielmoch.com/blog/2018/03/structural-problems-with-for-profit-social-media/
---
 

Many of you who know me personally know that I've become increasingly concerned with online privacy over the past few years. It's a topic that is near and dear to my heart, because I think the privacy, including online privacy, is very important to a healthy civic life. I hope to write a lot more about that going forward, but for now I want to introduce you to someone whose work I'm only beginning to dig into myself, but who has an awful lot of really smart things to say on the topic of online privacy (among other things): Zeynep Tufekci.

I spare you my attempt at a mini-biography, mostly because I'm about the least qualified person in the world to deliver. Rather, I'll point you to this [TED talk](https://www.ted.com/talks/zeynep_tufekci_we_re_building_a_dystopia_just_to_make_people_click_on_ads) that she did October of last year where she talks about the infrastructure that companies like Facebook and YouTube control and how much they're able to do with the data they collect on us.

Here are a couple of quotes a took down as I was listening:

- It's not that the people that run Facebook or Google are maliciously and deliberately trying to make the world more polarized and encourage extremism. ... But it's not the intent and the statements that [these folks] are making that matter; it's the structures and the business models they are building.
- Either Facebook is a half-a-trillion dollar con and ads don't work on the site ... or it's power of influence is of great concern.

Her prescription seems on point: "We need a digital economy where our data and our attention is not for sale to the highest bidding authoritarian or demagogue." That's actually just the sound-bite synopsis of her more nuanced call for businesses, consumers, and governments all to work together to determine what our collective vision is for all of the algorithmic magic (read: artificial intelligence) underlying these systems, how they should operate, and the moral systems that ultimately must be coded into them.

Evangelical Christians in the circles I run in have begun in the past few years to seriously confront the fact that cultural structures often exist to keep the powerful in power. I think a lot of us are going to have to take a look at what has grown out of the combination of free markets and the internet have caused to grow up, and then have a very serious discussion about what might need to change.
The Technology Behind The Satellite Images.
Tags: amozonsagemaker, machinelearning, naturallearning
Published: 2018-03-22 20:00:54

---
title: The Technology Behind The Satellite Images.
published: True
description: The satellite Images, Images of remote places on Google, DigitalGlobe etc., is made easy with the advanced Machine Learning technologies on Big Data Platform. This post gives one among them.
tags: #AmozonSagemaker #MachineLearning #NaturalLearning
---

You get the images of the world’s smallest places into your hands from Digital Globe. Did you know the technology behind?

DigitalGlobe is the world’s leading provider of high-resolution images of any places on this earth. It helps people to find, access any images from 100PB image library.  It is a Geospatial Big Data Platform (GBDX) users can just push a button, create a model, and deploy it all within one scalable distributed environment at an ease.

The technology behind the company uses is Amazon Sagemaker. Get the basics of the technology. Check Out: https://mindmajix.com/amazon-sagemaker-ai-game-changer.
Should I accept a Linkedin connection request from a candidate we didn't hire?
Tags: discuss
Published: 2018-03-22 18:27:36

---
title: Should I accept a Linkedin connection request from a candidate we didn't hire?
published: true
tags: discuss
---

The candidate wasn't bad but the consensus was thumbs down. There's always the possibility our paths will cross again in the future but for some reason accepting feels awkward. 

What would you do?