teleren/devto huggingface dataset:
A nice-to-have browser extension which shows file icons on GitHub, GitLab, etc.
Tags: showdev, javascript, opensource
Published: 2018-08-11 03:40:11

---
title: A nice-to-have browser extension which shows file icons on GitHub, GitLab, etc.
published: true
description: A browser extension which gives different filetypes different icons to GitHub, Gitlab, Bitbucket, gitea and gogs.
tags: #showdev, #javascript, #opensource
---
<p align="center">
<img width="989" alt="screen shot 2018-08-11 at 13 16 29" src="https://user-images.githubusercontent.com/12113222/43987738-ce272626-9d68-11e8-86f5-456d09a04dc3.png">
</p>

I just wanna make those websites look better. Beautiful UI gets people into good mood.

The browser extension works on **GitHub**, **Gitlab**, **Bitbucket**, **gitea** and **gogs**.

It's availble on Chrome and Firefox. So far, on Google Chrome Web Store, over 3,000 users have installed it.

#### Repo Link: https://github.com/xxhomey19/github-file-icon

## Install now
<p>
<a href="https://chrome.google.com/webstore/detail/github-file-icon/ficfmibkjjnpogdcfhfokmihanoldbfe"><img border="0" src="https://developer.chrome.com/webstore/images/ChromeWebStore_BadgeWBorder_v2_496x150.png" width="150"></a>
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/github-file-icon/">
<img border="0" src="https://addons.cdn.mozilla.net/static/img/addons-buttons/AMO-button_1.png" width="150"></a>
</p>
Python's `help()` in other languages.
Tags: discuss
Published: 2018-08-10 23:09:16

---
title: Python's `help()` in other languages.
published: true
tags: discuss
---

In Python's interactive interpreter, I can do thiq: 

    >>> help(reduce)

And it'll pop up a help page like this:

```
Help on built-in function reduce in module __builtin__:

reduce(...)
    reduce(function, sequence[, initial]) -> value
    
    Apply a function of two arguments cumulatively to the items of a sequence,
    from left to right, so as to reduce the sequence to a single value.
    For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates
    ((((1+2)+3)+4)+5).  If initial is present, it is placed before the items
    of the sequence in the calculation, and serves as a default when the
    sequence is empty.
```

I can do this for non built-in functions as well. A triple-quoted string at the start of the function body defines a "docstring".

```
>>> def handshakes(n):
...     """Returns the number o handshakess that occur in a group of n people if everyone shakes everyone's hand."""
...     return (n*(n-1))/2
... 
>>> help(handshakes)
```

I get this help page:

```
Help on function handshakes in module __main__:

handshakes(n)
    Returns the number o handshakes that occur in a group of n people if everyone shakes everyone's hand.
```

This makes it very easy to interactively explore new libraries. I often find myself wishing more languages had this feature, especially JavaScript or exploring web APIs.

Thoughts?
Jelly Fin: Automate Money To Live Better
Tags: serverless, javascript, jellyfin, automation
Published: 2018-08-10 22:44:31

---
title: Jelly Fin: Automate Money To Live Better
published: true
description: The journey to ditch a spreadsheet and code my own solution to personal finances
tags: serverless, javascript, jellyfin, automation
---

This is just a brief write-up about a personal project I've undertaken to abstract on an Excel spreadsheet I use for personal finances.

Chances are, you're a developer.  Functions, variables, and constants are commonplace in our world.  If you've never touched Excel, Microsoft's Spreadsheet tool, you could probably keep your head above water given enough time with it.

My wife pays the bills.  Initially when we got together, she would monitor the bank account and use an app to keep a ledger on the transactions.  She would input the transactions that have already occurred and input postdated transactions to predict the balance in the future.

The minimum balance of the bank account from now until the last postdated transaction was the amount we could spend without overdrawing the account.  It's a rudimentary way to handle the finances, but it worked.

---

Fast forward to present day.  Tracking individual transactions and making sure they align with your bank account is tedious.  We offloaded most of our variable transactions to a credit card so what's left coming out of our shared account is constant amount bills and we can pay a flat rate to the credit card to clear any balances charged.  Using constants, we're able to predict the balance of our bank account as far as we want.  Right now, we're tracking to the end of the year.

So, here's my goal.  I'm going to wrap an app using serverless technology (because the idea of not having to spin up VMs and code a crazy backend sounds like magic).  The frontend will need to work on Android and iOS (maybe web later).  I'm not set on a frontend framework yet, but it'll probably be React.

Ultimately, I want the app to be able to forecast our balance 3-6-12 months into the future and any variable transactions (like our electric bill) I want to use some statistical analysis to track seasonality...meaning if you know your bill goes up on average 40% from April to May, I want to predict that amount and help tighten the gap between a yearly average and actual values.

Anyway, that's the idea.  I'll share more details later as the app progresses.  You can follow along at #jellyfin
iOS Development "There's no information available for In-App Purchases.
Tags: discuss, troubleshoot
Published: 2018-08-10 21:05:18

---
title: iOS Development "There's no information available for In-App Purchases.
published: true
description: 
tags: #discuss #troubleshoot
---

I need some help identifying why my iOS app is giving me so much trouble. My iOS app was working fine before. Then I got a new computer, did a VERY small update to the app and submitted it for testing. Now when I open the app in from Test Flight, I keep seeing this message. "There's no information available for In-App Purchases. Try again later. [Environment: Sandbox]"

Any ideas?
Mobile Device for testing Android?
Tags: help
Published: 2018-08-10 20:32:25

---
title: Mobile Device for testing Android?
published: true
tags: help
---

Y'all, I am deep in the Apple ecosystem, and I've been making iOS applications. I want to extend over to Android, but I am completely ignorant. I cannot find Android devices in local thrift stores, and I don't know what I should be looking for. 

What physical device(s) do you use to test your Android applications? What do you recommend?
Clojure on the IBM i        
Tags: clojure, ibmi
Published: 2018-08-10 20:02:13

---
title: Clojure on the IBM i        
published: true
description: Using the IBM i (AS400) from Clojure
tags: Clojure, IBMi 
---

I have been using Clojure to make API's that talk to IBMi servers. 

Clojure is nice because it interops nicely with Java, so it can access the IBMi via the [JT400 toolkit](https://javadoc.midrange.com/jtopen/index.html?com/ibm/as400/access/AS400.html).  

I do a lot of support for various clients running IBMi servers.  There are many troubleshooting exercises that I used to have to do manually, serially and asynchronously.  Connect to a client, run a report, scan the results,  check a constant here, check a constant there - verify certain jobs are running and have no messages etc.

I can now point my browser at an URL, and my Clojure program will run the whole troubleshooting tree, and present me a webpage showing me all of the results.  Often I can even include a "Fix it button" next to the problems.  

If you are interested, here is a pretty bare bones starter gist:  

{% gist https://gist.github.com/jreighley/2acee67c179eba762844561115d865cd %}
What Are Some Good Starting Points to Learn What I Need to Write My Own Toy Language?
Tags: beginners, help, career, discuss
Published: 2018-08-10 19:49:26

---
title: What Are Some Good Starting Points to Learn What I Need to Write My Own Toy Language?
published: true
description: 
tags: beginner, help, career, discuss
---
![image of scratch code in action](https://thepracticaldev.s3.amazonaws.com/i/ge15l4q9q3univr82vic.png)
So, I asked this question in the comments section of somebody else's post. Then I realized, if I turn my question into a post it may reach a larger number of people! So below I have shamelessly copy pasted the question verbatim. *_LEND ME YOUR BOTTOMLESS WISDOM DEV.TO COMMUNITY!_*

>So I'm pretty new to the development world. But ever since I started I've wanted to make a toy language of sort as a side project/learning experience. Do you have any advice on how to get started with that? I'm pretty limited on the computer science side of things. I'm an active web developer with experience of only high level languages (both interpreted and compiled). I plan on getting an Arduino simply to play with some Assembly code. I've read the book _Code: the hidden language of computer hardware and software_ and more or less understood the information it presented. (Sometimes much closer to the _less_ side of things...). I became a web developer via a boot camp. And while it was great and did give me the chance to acquire the skillset to jump directly into the workforce. There is *SO MUCH _MORE_ I WANT TO DO AND LEARN!* The two primary things I want to accomplish in the near future are:
1. - Write a toy language
2. - Use relays to create a 4-bit adding machine called "The Nybbler" (get it?)

>![Learning how to do stuff Rick and Morty style](https://thepracticaldev.s3.amazonaws.com/i/6gnssjnu6mgmgrgnzc5c.jpg)

>I'm not somebody who sits around with a bunch of pipe dreams. When I want to do something I go and I try to do it. So if anybody has some good starting point advice on making a toy language. It would be very, very appreciated.

Here is the article that inspired the question BTW...

{% link https://dev.to/mortoray/sadly-i-must-say-goodbye-to-leaf-my-programming-language-d6/comments %}
"No Config" Bundling with Parcel
Tags: devlive
Published: 2018-08-10 18:40:03

---
title: "No Config" Bundling with Parcel
published: true
description: Using the Parcel bundler to transpile and serve a Typescript & React project - without writing a configuration file!
tags: devlive
---

This workshop will focus on using Parcel - a web application bundler - to bundle up and serve a Typescript & React project without writing a configuration file! Parcel is a quick and lightweight alternative to bundlers like Webpack and Rollup. We'll discuss bundling in general, dive into some source code, and go over the steps required to set up and add dependencies to our application.

All levels are welcome! Prior experience with a bundler is helpful for context, but not required.

## Timeline

- 0:00: Introduction
- 4:30: TLDR; Bundlers
- 5:55: Ways of creating production code
- 7:40: Enter the Webpack!
- 10:12: What you get with Parcel
- 11:55: Let's try it! Starting from Scratch
- 20:00: "Automagically" Installed Dependencies
- 29:30: What about production?
- 30:35: Writing a configuration file
- 33:25: The Takeaway


[Click here for slides!](https://docs.google.com/presentation/d/1cscgpQGQcCuXCUwCP8_L7RO0_LJ_eutVNm05IdKZOuY/edit?usp=sharing)

*This DEV Live Stream was recorded on July 23, 2018*
Join the next Live Stream. See all upcoming events [here](https://dev.to/events).
The case for replacing Array.slice
Tags: elm, api
Published: 2018-08-10 18:28:14

---
title: The case for replacing Array.slice
published: true
description: Array.slice is useful, but unintuitive. There are better primitives which should be used instead.
tags: elm, api
---

I recently did some work which required me to create a sub-section of an `Array`. This can be done by using `Array.slice` but doing so always gives me the feeling that there is room for improvement.

To explain why, let's start by looking at a small example:

`Array.slice 2 5 someArray`

It isn't immediately obvious to me what this does. I know it creates a sub section, but when reading this I always have to stop up and calculate what the result will be. Usually, because I don't use this function too often, I also have to look up the documentation to check if the from and to indices are exclusive or inclusive.

The conclusion is that this particular code will create a new array, containing the values of indices 2, 3 and 4 of `someArray`. This might not seem too bad when you actually want to extract a sub-section of an array from some index and to (but not including) another, but in my experience that is rarely the case.

Usually what you -- well, I -- want is either to remove the first couple of elements, or to remove the last couple of elements. Since `slice` is all we got, we've always got to consider what value to use for both arguments, which adds a slight, but unnecessary, mental overhead.

For instance, removing the first two elements is implemented as:

`Array.slice 2 (Array.length someArray) someArray`

This doesn't read as easily as `Array.drop 2 someArray`, but another problem is that it doesn't play well with pipelines. Removing the last element is easier as `slice` supports negative indices, although it is a little more cryptic than it has to be:

`Array.slice 0 -1 someArray`

Even if you actually want a true sub-section, I'd argue that it would be easier to understand the code if you expressed it as two separate operations, like this:

```
someArray
  |> Array.drop 2
  |> Array.take 3  
```

or

```
someArray
  |> Array.drop 2
  |> Array.dropLast 2
``` 

In summary, I believe `slice` is a bad fit for functional programming. Using functions which have a clear intent and an intuitive usage is a better fit, and so I believe `slice` should be replaced with `take`, `takeLast`, `drop` and `dropLast`.
Hi Community 👋🏼
Tags: new, webdev, noob, presentation
Published: 2018-08-10 18:17:32

---
title: Hi Community 👋🏼
published: true
description: This is my first post here :) (Only a presentation)
tags: new,webdev,noob,presentation
---

Hi :)
First of all, I just discovered this, and I'm in love with it, nice platform.
I'm Saúl (alias @elGolpista) (webdev mostly) from spain.
I'm here to read and post things.
This is [my Personal site](https://saul-bt.github.io).
![Yeah, its Ralph](https://media.giphy.com/media/ASd0Ukj0y3qMM/giphy.gif)
I hope to learn a lot here 😃
Which is the best alternative to start a blog?
Tags: blog, github, jekyll, platforms
Published: 2018-08-10 18:04:14

---
title: Which is the best alternative to start a blog?
published: true
description: 
tags: blog, github, jekyll, platforms
---

I want to start sharing my little fragments of code (like gist) and its explanation in a simple and efficient personal blog, but I do not know what platform use. What do you all recommend?

Nothing complicated like Wordpress, etc. I was thinking on GitHub Pages with Jekyll, what do you think?
How can i get my first job on another country?
Tags: developpers, job, country, discuss
Published: 2018-08-10 18:02:26

---
title: How can i get my first job on another country?
published: true
description: 
tags: developpers, job, country, discuss
---

Hello everyone, I'm Brazilian Js Developper and I have some fears about this, though it's my dream.
There is a lot of prejudice in your countries about foreign developpers ? 
And how can i get a job of another country? Tell me your opinion.
Generate UUID fields in Phoenix with Postgresql
Tags: elixir, postgres
Published: 2018-08-10 16:34:15

---
title: Generate UUID fields in Phoenix with Postgresql 
published: true
description: How to auto-generate UUID fields automatically in Phoenix with Postgresql.
tags: elixir,postgreSQL
---

If for some reason you need to create a `UUID` field for your schema (a non-primary key field), and you don't want to manage the creation of the value to store on the new database record, you can specify in the migration to use as default value the `uuid_generate_v4()` **Postgresql** method, so it will be auto-generated on the insert:

```ruby
defmodule App.Repo.Migrations.AddUuidFieldToUser do
  use Ecto.Migration

  def change do
    create table(:users) do
      add(:some_new_field, :uuid, default: fragment("uuid_generate_v4()"))
    end
  end
end
```

Depending on the configuration of your database, maybe you will see this error running the migration:

```bash 
** (Postgrex.Error) ERROR 42883 (undefined_function): function uuid_generate_v4() does not exist
```

This is because your database hasn't the `uuid-ossp` module activated. You can activate by login to your database and execute this query:

```sql 
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
```

Or if you don't have access to the database, you can create a migration in order to execute the query like:

```ruby 
defmodule App.Repo.Migrations.AddUuidGenerateV4ExtensionToDatabase do
  use Ecto.Migration

  def change do
    execute("CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";")
  end
end
```

You can see more in-depth information about `uuid-ossp` module [here](https://www.postgresql.org/docs/9.4/static/uuid-ossp.html). So when the migrations are executed properly, add to your schema the new field, and there you have it! Your new shiny auto-generated `UUID` field.

```ruby
defmodule App.User do
  use Ecto.Schema

  import Ecto.Changeset

  schema "users" do
    ...
    
    field(:some_new_field, :binary_id)

    timestamps()
  end
  
  ...
end
```

> This post is originally published [here](http://http://dreamingecho.es/til/generate-uuid-fields-in-phoenix-with-postgresql).
What are your best practices for writing documentation?
Tags: documentation, discuss, askdev
Published: 2018-08-10 16:27:33

---
title: What are your best practices for writing documentation?
published: true
description: Do you stick to the big words, the little words, or no words at all?
tags: documentation,docs,discuss,askdev
---

Suppose you've been tasked with writing documentation about a project you've been highly involved in it's creation, from start to finish you had a voice in it - how would you go about writing documentation that is **customer** friendly, while maintaining key knowledge such as system functionality, order of operations, with mock data?
My First Post, and I want you guys to be part of it!!
Tags: portfolio, webdev, career, help
Published: 2018-08-10 15:57:28

---
title: My First Post, and I want you guys to be part of it!!
cover_image: https://thepracticaldev.s3.amazonaws.com/i/xqrjcc0cluw888tkc8nv.PNG
published: true
description: 
tags: portfolio, webdev, career, help
---

Hi guys! I am new here at dev.to, I'm trying to get the job right here and developed my online portfolio.

It would be an honor to have some feedback/suggestions from the great community of dev.to and gain more knowledge from you guys!!

Here is my portfolio: https://www.enriquerimando.com/

Thank you very much!

Update: I have updated some the site as of today 8/11/2018 SGT.
Difference, Union and Intersection in Ruby arrays
Tags: ruby, settheory
Published: 2019-05-30 00:24:33

---
title: Difference, Union and Intersection in Ruby arrays
published: true
tags: ruby,set-theory
canonical_url: 
---

It’s done with basic operators instead of methods: `-` for difference, `|` for union, and `&` for intersection.

An important detail is that all duplicated items are automatically removed. Which allows to make an array unique finding the intersection between itself: `[1, 1, 2] & [1, 1, 2] = [1, 2]`.

### Difference

![](https://thepracticaldev.s3.amazonaws.com/i/mlusgek25ysbdg49lsnl.png)

```
[1, 2, 3] - [3, 4, 5] = [1, 2]

[3, 4, 5] - [1, 2, 3] = [4, 5]
```

In summary, it returns the unique values only present in the first array.

### Union
![](https://thepracticaldev.s3.amazonaws.com/i/yglqkaqwi6wcdlafvobg.png)

```
[1, 2, 1, 2, 3] | [1, 2, 3, 4] = [1, 2, 3, 4]
```

### Intersection
![](https://thepracticaldev.s3.amazonaws.com/i/4ci0qs73r29xe1g3sppf.png)

```
[1, 1, 3, 5] & [1, 2, 3] = [1, 3]
```

Source: [https://www.endpoint.com/blog/2011/06/07/using-set-operators-with-ruby-arrays](https://www.endpoint.com/blog/2011/06/07/using-set-operators-with-ruby-arrays)
Fixing git commits - you always did it wrong
Tags: git, howto
Published: 2018-08-10 14:35:48

---
title: Fixing git commits - you always did it wrong
published: true
description: Unless you did it with --fixup and --autosquash
tags: git, howto
---

> ... unless you did it with --fixup and --autosquash

The most important thing first: Of course you never change commits in branches that you share with others like `develop`, `master` or whatever you call your "main" git  branches. If you encounter an error there, just fix it with a new commit.

When you're working on a branch on your own like a feature branch or local branch there's a more elegant way to fix commits.

Take a look at the following git log:

```
8680a59d This is the 3rd commit
7e866455 This is the 2nd commit
a069e42a This is the 1st commit of my feature branch
0e2977b5 Previous commit that is already integrated in master
```

Imagine you want to fix an error in the 2nd commit.

Make the file changes to fix the problem and add the changes to the stage, e.g. with `git add --all`.

```
git commit --fixup 7e866455
```

Notice the commit hash `7e866455` is the one from the commit that contained the error. Now your git log looks something like this:

```
335ca372 fixup! This is the 2nd commit
8680a59d This is the 3rd commit
7e866455 This is the 2nd commit
a069e42a This is the 1st commit of my feature branch
0e2977b5 Previous commit that is already integrated in master
```

The new commit has the commit message from the 2nd commit, but prefixed with `fixup!`.

You can do this multiple times for the same or for different commits in your branch. When your branch is ready to be merged (or reviewed) you'll want to clean things up. Just run:

```
git rebase -i --autosquash 0e2977b5
```

The commit hash `0e2977b5` is the one your feature branch is based on ("previous commit").

This will apply your fixup commits directly to the commits they belong to and you will get a clean git log with all errors fixed.

```
26fe362d This is the 3rd commit
5db42a3d This is the 2nd commit
a069e42a This is the 1st commit of my feature branch
0e2977b5 Previous commit that is already integrated in master
```

✨✨✨
Controlling a raspberry pi 3 from an android app
Tags: help, android, dev
Published: 2018-08-10 13:35:27

---
title: Controlling a raspberry pi 3 from an android app
published: true
tags: help, android, dev
---

Hi.
I'm planning to create an android app that will send commands and receive some results to/from a raspberry pi 3 module. For example one such command could be to enable a fan for 3 mins. For these three mins (while the fan is running) the raspberry pi will send the temperature data received from a temp sensor, in the app side, where a graph with these values will be provided. 

The way I'm thinking of it:
The app is going to scan for available devices. 
It will connect to the raspberry pi.
A python Bluetooth server will run on the raspberry pi site executing the commands that the android app sent to it and will send back to the app some of the data.

So far I found by a search on the internet, the Evothings framework but I would like to read your suggestions on how to build quite easily such app.

Thanks