teleren/devto huggingface dataset:
Git: hide specific branch when doing git log --all
Tags: git
Published: 2022-02-17 20:21:23

---
title: "Git: hide specific branch when doing git log --all"
published: true
description: How to hide a specific branch when looking into git log history.
tags:
  - git
cover_image: https://strdr4605.com/git-hide-specific-branch-when-doing-git-log-all.jpg
canonical_url: https://strdr4605.com/git-hide-specific-branch-when-doing-git-log-all
---

I deploy https://strdr4605.com on Github pages. Deployment and hosting are on `gh-pages` branch.
When doing my usual check of branch status and history using:

```bash
git log --oneline --all --graph
```

I faced this problem:

![git gh-pages branch](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0vyge1k0xrromzksoodb.png)

I see a very long list of commits on `gh-pages` branch and I need to scroll down to see my other branches.

## Solution

You can hide a specific branch using `--exclude` option for `git log`. Now my command looks like this:

```bash

git log \
--oneline \
--graph \
--exclude=refs/remotes/origin/gh-pages \
--all
```

Now it looks better:

![git hide gh-pages branch](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kuf2wf4h6rhaple116vz.png)

You can add this command in a git alias.

If needed check [here](https://stackoverflow.com/questions/9437182/git-show-all-branches-but-not-stashes-in-log) for more things to exclude from `git log`.

> You can check why I prefer to do long commands instead of git aliases at [How I use Git](https://strdr4605.com/how-i-use-git).
14 Codepens to Blow You Away!
Tags: javascript, webdev, css, html
Published: 2022-02-17 20:03:02

Have you ever come across some CSS or Javascript code that blew you away through it's elegance and functionality? 
No?
Well there's a first time for everything.
Plus, some of these codepens are excellent learning material for Web Designers and Web Developers.

*********************
##Blooming flowers in pure CSS
{% codepen https://codepen.io/mdusmanansari/pen/bGYrmjY %}

***************

##A 3D gaming room made from pure CSS
{% codepen https://codepen.io/ricardoolivaalonso/pen/mdPzrpe %}

***************

##A pure CSS interactive 3D stopwatch
{% codepen https://codepen.io/jh3y/pen/JjrNZXa %}

***************

##Newton's lightbulbs loader
{% codepen https://codepen.io/jh3y/pen/abzeaWJ %}

**************

##A 3D isometric color picker
{% codepen https://codepen.io/jkantner/pen/xxXmVKw %}

*************

##A neon heart animation
{% codepen https://codepen.io/al-ro/pen/BaaBage %}

**************

##A self-destruct button
{% codepen https://codepen.io/josetxu/pen/LYxzQYQ %}

**************

##A tilting maze game

{% codepen https://codepen.io/HunorMarton/pen/VwKwgxX %}

**************

##A simple chess AI

{% codepen https://codepen.io/jakealbaugh/pen/JjRGQPY %}

**************

##Stairs on wall with pure CSS

{% codepen https://codepen.io/josetxu/pen/GRMdpRM %}

**************

##Holographic pokemon cards

{% codepen https://codepen.io/simeydotme/pen/PrQKgo %}

**************

##Turning page effect in pure CSS

{% codepen https://codepen.io/amit_sheen/pen/WNweryv %}

*************

##A double helix in pure CSS

{% codepen https://codepen.io/shshaw/pen/eYGPXVr %}

************

##A wordle game

{% codepen https://codepen.io/jonslater204/pen/xxPKmNE %}

************
************

That's it for this compilation.
Hope you enjoyed!
Javascript, Sql, and File Saving
Tags: javascript, react, sql, rails
Published: 2022-02-17 19:56:01

#Creating Files in Javascript
This post will be over creating Files in Javascript and them uploading them to an SQL database. The first step to this process is creating the file. In Javascript there is a File Object that can be used to create Files. The constructor File() takes several components.
```
const newFile = new File([fileData], `filename.extension`, {
            type: "filetype/filesubtype"
        })
```
To create a file use the constructor in a above mentioned way where fileData can be any sort of File data you need from strings to binary, the second parameter is the filename where it is helpful to put the extension on the end, and the third parameter is the filetype and subtype. Here is a better explanation, and a list of all the possible file-types, [MDN](https://developer.mozilla.org/en-US/docs/Web/API/File/File) and [FileTypes](https://www.iana.org/assignments/media-types/media-types.xhtml).
#Creating The SQL Table
To store files of any type in SQL the table you create needs to have three attributes, a binary and two strings. The binary will contain all the data that the file has, the two string will be for a name and the file mime/type (mime is name for file type). Here is the table in rails
```
create_table :save_files do |t|
      t.binary :file_data
      t.string :file_name
      t.string :file_mime
end
```
#Uploading
Now to upload the files to the SQL you will have to convert the data to binary. Luckily, Javascript has an excellent function for this arrayBuffer(). Using arrayBuffer() on your previously created file you can create a  promise that you can then call a second function Uint8Array on the return creating a binary data object. Then you can simply upload the file with whatever method you want to with the data from the file.
```
file.arrayBuffer()
   .then(r=>{
       const fileData = new Uint8Array(r)
       fetch(`whereverYouWant`,{
       method: "POST",
       headers: {
            "Content-Type" : "application/json"
       },
       body: JSON.stringify({
            file_data: fileData,
            file_name: file.name,
            file_mime: file.type,
       })
    })
```
#Downloading
To download the file you need to fetch the information. The only thing different from creating the file is that you will need to create an array buffer for the file data. For creating the array buffer make the length equal to the file_data length that you pulled from the SQL and then from that buffer create a new Uint8Array for the data. Then you use that Uint8Array for the date of the file you create.
```
const buffer = new ArrayBuffer(data.length)
const view = new Uint8Array(buffer);
// create file with view for file data and all the other info you pulled from sql
```
You can then use this file in any way you like from downloading to onsite integration.
How to Cheat at Flexbox Froggy by Using Chrome Developer Tools to Hack the Answers
Tags: javascript, webdev, beginners, tutorial
Published: 2022-02-17 19:26:12

In this video I’m going to show you how you can cheat at Flexbox froggy by using the chrome developer tools. We are going to do this by using the chrome developer tools to inspect the page. If you are having trouble with one of the levels this is a great way to get a hint plus you can feel like a hacker.

Unfortunately we will not learn Flexbox by hacking Flexbox Froggy but we will learn about the chrome developer tools. 


{% youtube KIlBjT9FlSc  %}
Welcome Thread - v164
Tags: welcome
Published: 2022-02-17 19:05:29

---
title: Welcome Thread - v164
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
canonical_url: 
---

![Shrek saying "Oh, hello there"](https://media.giphy.com/media/GqtNlBsWoEXDy/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
SVGs
Tags: javascript, html
Published: 2022-02-17 18:52:38

#Scalable Vector Graphics
SVGs are a possible alternative to images in html. They are as the title says a Vector Graph. The two main components are the viewbox and the path. Viewbox defines the area of the graph that the SVG will present, so if you say have a line of equation y = 5, and the viewbox is 0, 0, 20, 5, the line will be at the top of the SVG graphic with the graphic only presenting a line segment from x = 5 to x = 20 (the viewbox syntax is x1, y1, x2, y2). The path is the lines that are defined within the graph, which sadly do end and are defined by point to point. The syntax gets a little complicated for this so I'll just send you to the [MDN Web Doc](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths).
#The Use
SVGs are best used for replacing images that are not to complicated or needs to "scale" as they scale better than a normal .jpg or .png would. So, perhaps instead of a company logo or instead of the simple background image you should use SVGs to display that graphic. Also on a completely unrelated note here is a little program I made to create SVGs (work in progress) [Here](https://github.com/bjupfield/my-website).
Gestão/Automação Processos
Published: 2022-02-17 18:49:03


**Solicitação de Arquivo em Servidor**

Para iniciar um processamento de uma planilha era necessário pedir   os arquivos em TXT em um servidor que só disponibilizava esses arquivos após as 18h.

E esse arquivo deve ser pedido todo 1° dia útil do mês. Porém como o prazo de entrega desse processamento tem que ser o mais rápido possível, foi cogitado por mim um teste as 6h da manhã já que dava a entender que o arquivo só era gerado fora do horário comercial. 
Foi desenvolvido um robô utilizando VBA/Excel, Script(.Bat),Outlook, e Agendador de tarefas do Windows.
Esse robô realizava os seguinte passos

> 1. Disparo realizado pelo Agendador de tarefa do windows
> 2. Abrir o sistema ERP da empresa(.Bat)
> 3. Abrir a planilha de pedido(.Bat)
> 4. Realizar o Login e pedido do arquivo (vba)
> 5. Salva a planilha e envia o um e-mail utilizando o Outlook com o status do pedido para meu email pessoal(vba)

Caso houvesse algum erro eu já recebia a informação e já atuava.

Após testes foi implementado e os arquivos eram disponibilizados no horário solicitado(pela manhã antes do expediente)

Ao iniciar o dia de trabalho já estava com os arquivos ganhando 1 dia no prazo
You sure you will go with Laravel Horizon?
Tags: webdev, laravel, redis
Published: 2022-02-17 12:55:00

You sure you will go with Laravel horizon? In some cases, you shouldn't. Especially when you use Redis cluster.

### Horizon doesn't work with Redis cluster

Horizon doesn't work with Redis cluster if it has multiple shards. But this is not mentioned [in the doc](https://laravel.com/docs/9.x/horizon#:~:text=Laravel%20Horizon%20provides%20a%20beautiful,%2C%20runtime%2C%20and%20job%20failures.). You will notice it when you increase number of shards of Redis cluster, or when you find [this issue](https://github.com/laravel/horizon/issues/274#issuecomment-457218217). As a workaround, I tried hash tag keys, but Laravel horizon still didn't work alongside Redis cluster with mutiple shards.  

### Laravel queues work with Redis cluster?
Meanwhile, [queues](https://laravel.com/docs/9.x/queues#redis) of Laravel seems working with Redis cluster. It's confusing to me. Please note that I haven't tested queues alongside Redis cluster with multiple shards, so actually I don't know if it really works, but queues seems better bet. 

Even if you go with laravel queues, if you use database driver with MySQL that is older than 8.0, [it might cause deadlocks](https://divinglaravel.com/a-production-ready-database-queue-diver-for-laravel). I think this is not mentioned in the doc too.

### You cannot use multi/exec/watch/unwatch in Redis cluster with multiple shards (at least with predis)
You know, to keep data consistency, you sometimes must  use watch/unwatch/multi/exec (to start something like transaction) to save dave data in Redis. [But this doesn't work in redis cluster](https://github.com/predis/predis/issues/275#issuecomment-133649461). It might work in your dev environment that uses single Redis node but not in production that uses Redis cluster with multiple shards.

### Conclusion
In some situations, queues is a better bet.
Como trabalhar com Loop no Dart
Published: 2022-02-17 18:17:09

Iremos iniciar uma lista

```
var list = [1, 2, 3, 4, 5, 6];
```

Utilizando o método `forEach`

```
list.forEach((element) {
  print(element);
});
```
Utilizando `for` Loop

```
for (int i = 0; i < list.length; i++) {
  var e = list[i];
  print(e);
}
```

Utilizando `for in` Loop

```
for (var e in <List>[list]) {
  print(e);
}
```

Utilizando `while` Loop

```
var i = 0;
while (i < list.length) {
  print(list[i]);
  i++;
}
```

Repo:

[loop-dart](https://github.com/Code-0-4-1/loop-dart)
Trabajo basura y precariedad
Tags: webdev, beginners, programming
Published: 2022-02-17 18:09:43

Hoy me apetece un poco hablar sobre la precariedad laboral que se vive en este y muchos otros países. Si te das cuenta, desde que comenzó la pandemia, se ha hecho más evidente la existencia de contratos basura y la falta laboral que sufren muchos sectores: médico, construcción, educación, restauración y hostelería... y la lista llega a casi cualquier rincón. Durante estos casi dos años que llevamos en esta situación (aunque todavía parece que hay gente que no se ha enterado), el reto de la mayoría de personas ha sido mantener como ha podido su puesto de trabajo a refugio de los golpes con los que ha ido llegando cada nueva ola. Aunque eso significase tener que renunciar a ciertos derechos y beneficios. 🤐  

A raíz de la pandemia hemos descubierto nuestra gran resiliencia, para que negarlo (incluso hemos descubierto el significado de la propia palabra) dándonos cuenta de la fuerza que tenemos para resistir los golpes de una ola tras otra. Al fin y al cabo, somos humanos, y podemos con todo lo que nos echen. Pero al mismo tiempo, también hay que decirlo, nos hemos dado cuenta qué hay cosas en nuestros trabajos que no funcionan como deberían. 🔥 

Por ejemplo, la hostelería y el comercio viven con interminables jornadas abusivas y sin dos días seguidos de fiesta que les permita conciliar la vida laboral con la social/familiar (y lo digo desde la propia experiencia 😵). El sector médico se dedica a hacer malabares entre contratos basura y recortes mientras cuidan de nuestros enfermos. La educación se mata a enseñar a las nuevas generaciones entre cuarentenas y falta de docentes (y no porque no los haya, sino porque no los contratan). El sector del turismo se ha convertido en el nuevo marginado del grupo... Y qué decir de las empresas que no vemos, que se permiten el lujo de explotar a sus trabajadores porque no hay un control más exhaustivo sobre ellas.  

Y por qué los gobiernos permiten esto? Tal vez sea porque tanta poca educación y sanidad les ha recortado y podrido el cerebro, qué sé yo. 🤢 O quizás es porque no estamos lo suficientemente informados y no llegamos a leer la letra pequeña de las ofertas y contratos. Te imaginas que en las ofertas a las que aplicases saliera un pequeño aviso en rojo “cuidado, posible contrato basura!”. Sería tremendo. Quizás las cosas funcionarían un poco mejor y conseguiríamos dar un buen toque de atención a algunas personas y empresas.

En mi opinión, a raíz de la pandemia, la población se siente desanimada, desmotivada por encontrar un trabajo debido a la precariedad de estos. En otros países, como EEUU, millones de trabajadores han decidido renunciar a sus trabajos debido a las condiciones en las que se encontraban, con la esperanza de lograr algo mejor. Durante la pandemia la gente estaba contenta solo por tener trabajo, pero con el tiempo, la desmotivación ha ido creciendo sin freno hasta el punto, que muchos profesionales se plantean abandonar.
Day-26 Training at Ryaz
Tags: javascript, beginners
Published: 2022-02-17 18:07:04

- Date:17/02/2022
- Day:Thursday

Today I started at about 10:30 am as previously I had created all the modules, controllers,routes so today I analysed that how to cope up with all these and watched some more tutorials upon node express and mongo db connection and various implementations that has to be performed in this task as we have to give certain privileges to user and host so today I basically understood various approach we can use for it and task could be completed by tomorrow. As this task is base of further task so I learnt various things by watching different course and now it would take less time to complete this task and it would be surely finished by tomorrow.
insertOrIgnore to Ignore SQL Errors - Laravel
Tags: webdev, beginners, laravel, php
Published: 2022-02-17 17:56:37

I found this tip and wanted to share it with you so that you can benefit from it in your next projects, which is if you are not sure that this row exists in the database and want to avoid sending an error message when this row exists here, use `` insertOrIgnore ``

Laravel InsertOrIgnore With Eloquent
```php
DB::table('users')->insertOrIgnore($data);
```
Laravel InsertOrIgnore Query With Eloquent Model
```php
User::insertOrIgnore($data);
```

I hope you benefited and enjoyed this code with him. If you want to dig deeper, visit these sources
https://www.mysqltutorial.org/mysql-insert-ignore/
https://www.tutsmake.com/laravel-eloquent-insertorignore-example/
https://www.youtube.com/watch?v=hqiUzO8EFbM
A complete guide to Flutter architecture
Published: 2022-02-17 11:42:27


![A complete guide to Flutter architecture](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lhx7n4zdamsnc8bm71fz.png)

Flutter is a UI toolkit from Google that allows users to build natively-compiled applications for the web, desktop, and mobile devices. It is also embedded from one single codebase, meaning that while Flutter embraces different platforms, it still originates from a single codebase.

And, because it’s a UI toolkit, it uses UI parts to give users the ability to create UIs without needing to create them in a particular way when structuring applications; Flutter builds UIs as code.

In this article, we’ll take a look at Flutter architecture and what it is comprised of. One of the benefits of learning the Flutter architecture is that it helps when structuring an application, like updating state, building widgets or screens, or making an app easy to maintain.

Knowing the Flutter architecture lets us get familiar with these core concepts that build up the architecture and aid in quick compilation and the code modification process.

[READ MORE](https://blog.logrocket.com/complete-guide-flutter-architecture/)
Tindakan Kecil Pada Mobil Namun Bermanfaat
Tags: bengkelmobilmedan, servicemobilmedan, bengkelmobil
Published: 2022-02-17 17:44:49


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cjgxwpjgjxlc4w3zbjiv.jpg)
Ketika kita telah memutuskan untuk membeli sebuah mobil baik mobil baru maupun mobil bekas tentu saja kita juga harus memahami bahwa seluruh mobil membutuhkan perawatan yang baik agar kita dapat menjaga performa mobil tetap baik. Dengan memahami serta mengetahui perawatan apa saja yang dapat kita lakukan pada mobil maka kita dapat menjaga berbagai komponen mobil dari kerusakan serta memperpanjang usia penggunaan mobil kita nantinya. Berikut ini beberapa hal kecil yang dapat kita lakukan namun kita telah ikut merawat mobil dengan baik.

**Rutin melakukan Service Mobil**
Service mobil merupakan hal yang sangat wajib untuk seluruh pemilik mobil lakukan dimana dengan melakukan service mobil secara berkala maka kita akan mendapatkan banyak manfaat untuk mobil kita. Salah satunya adalah dapat mendeteksi adanya kerusakan pada komponen lainnya sebelum komponen tersebut merusak bagian mesin mobil lainnya. [Service mobil] dilakukan sekaligus dengan pergantian oli mesin pada mobil untuk itulah kita wajib mengetahui kapan waktu yang tepat untuk mengganti oli mesin mobil kita.

**Mengecek air radiator**
Air radiator berfungsi sebagai pendingin mesin mobil ketika sedang berkendara nantinya oleh sebab itulah kita harus melakukan pengecekan pada air radiator apakah cukup atau tidak ketika hendak berkendara dengan menggunakan mobil. Ada baiknya kita tetap menggunakan air radiator berjenis coolant dimana cairan ini akan bekerja lebih maksimal dalam mendinginkan mesin mobil serta menjaga mesin agar tidak overheating.

**Memeriksa tekanan ban mobil**
Hal wajib yang perlu kita lakukan adalah selalu mengecek tekanan ban mobil telah sesuai dengan standar dari pabrik mobil. Dengan memeriksa tekanan ban mobil maka kita dapat menjaga kerusakan ban mobil, terhindar dari bocornya ban mobil yang diakibatkan oleh kekurangan angin serta meminimalisir resiko terjadinya kecelakaan akibat kerusakan ban mobil ditengah jalan ketika sedang berkendara.

Seluruh hal tersebut dapat kita lakukan dengan melakukan Service Mobil secara rutin yang telah dipercaya lebih dari 10 tahun untuk melakukan secara berkala. Dengan mekanik yang handal tentu saja anda dapat lebih terbantu dalam melakukan pengecekan komponen mobil serta merawat mobil.
Facebook Microdata Tags for WooCommerce and Shopify
Tags: microdata, tags, shopify, woocommerc
Published: 2022-02-17 17:40:10

I am an SEO and CMS expert, who have been helping clients from around the world for the last 5 years. Solving problems was the course of my day job, which I left just before the pandemic. I love solving issues and helping all size businesses.


I'll install all missing Facebook microdata tags onto WooCommerce or Shopify for all the products and also, sync products to Facebook Shop and Instagram Shopping over zoom/skype. 

Your instagram must have 1000 followers at least to qualify for auto sync feature by Facebook Commerce.

If your product is missing the Facebook Microdata meta tags, this gig will add the missing microdata tags, additional meta tags like Google Product category and product quantity for Facebook catalog.


Errors

Products on your website can't be automatically added to your catalog because of these issues.


Errors

`A required field is missing: id
A required field is missing: price
A required field is missing: availability`


Warnings

Products are added to your catalog without key information that impacts your ad campaign performance.


Warnings

These fields have missing information: google_product_category


quantity_to_sell_on_facebook for Facebook shop/catalogs


There are three gig packages

    Missing FB Tags (max 2 tags)
    Add all FB Microdata tags
    Add All FB Microdata tags and JSON-LD for all products 

The charge starts from $100 a store. I can be reached at amulya@tubemint.com