teleren/devto huggingface dataset:
Local Git LFS server with rudolfs
Tags: gitlfs
Published: 2023-03-12 13:01:57

I've setup a local Git LFS server with rudolfs open source lfs server by jasonwhite.

https://github.com/jasonwhite/rudolfs

## Background
I want to manage my Unity project on GitHub but its LFS size limit is 1GB by default. I was looking for local lfs server to save large files into a local disk.

Git LFS's wiki has a list of Git LFS implementations.
https://github.com/git-lfs/git-lfs/wiki/Implementations

I chose rudolfs which supports amazon S3 and local disk.

## How to use

```bash
$ git clone https://github.com/jasonwhite/rudolfs.git
$ cd rudolfs

# Generate a random key to encrypt files.
# Save this key to your password manager.
$ openssl rand -hex 32

# Assing the key to a variable for test run
$ KEY=********************************

# Test run with cargo
# --cache is unnecessary when use local disk
# "local" indicates to use local disk
# --path is where storing large file location
$ cargo run -- --host localhost:8080 --key $KEY local --path data
```
Now, rudolfs server is running as localhost:8080.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r3wzlg8l9leu44hjn62y.png)

Open localhost:8080 with a web browser and follow the instructions to set up Git LFS on your cloned local repository.

In my case .lfsconfig likes this.
```
[lfs]
url = "http://localhost:8080/api/kurohuku7/git-hub-reponame"
```

I added .mp4 extension to .gitattributes for testing.
```bash
git lfs track "*.mp4"
```

Then add an mp4 file to my repo. When I push it to GitHub, that video is saved in the rudolfs data folder specified by the --path attribute.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xp1xejoq39ueg51mwn9p.png)

On GitHub, the video file content is just a text pointer to the LFS server instead of the original video.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t2dd04zysdy21mzqeglv.png)

Delete the local repository and re-clone from the remote. The large video file comes from the local disk. Perfect.

This is enough for my personal use case for now. Now, I can manage codes on GitHub and save large files to the local LFS server. All I have to do is launch rudolfs when start-up or by some dev command.

## Tried with Amazon S3
I also tried using Amazon S3 as an online Git LFS server with rudolfs.

1. Create an IAM user with permission set to access S3.
2. Generate the IAM user's access key.
3. Create a new bucket for a LFS server.
4. Follow README of rudolfs.

Pass the AWS access key as environment variables and run docker compose command. When you push some large files as above, they should be saved on the S3 bucket instead of a local disk.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zntlce7ekt3hjps6wjcc.png)

That's fine though I'm OK to use a local disk. Happy to manage code on GitHub without worrying about large file size limits.
Đăng ký QH88
Published: 2023-03-12 12:44:11

Cách đăng ký [qh88](https://qh88.io/dang-ky-qh88/
) mới nhất được hướng dẫn trực tiếp từ nhà cái, giúp cho người chơi có ngay tài khoản mà không gặp phải khó khăn khi đăng ký
#dangkyqh88 #cachdangkyqh88 #dangkyqh88io
Địa chỉ: Gò Dầu, Tây Ninh, Việt Nam
Phone: 0906637607
Email: qh88iocasino@gmail.com
Website: https://qh88.io/dang-ky-qh88/
Zipcode: 840000

https://www.youtube.com/@dangkyqh88io/about
https://www.pinterest.com/dangkyqh88io/
https://www.tumblr.com/dangkyqh88io
https://www.flickr.com/people/197871456@N02/
https://dribbble.com/dangkyqh88io/about
https://www.twitch.tv/dangkyqh88io/about

https://www.behance.net/dangkyqh88io
https://www.reddit.com/user/dangkyqh88io
From PulseAudio to PipeWire
Tags: pulseaudio, pipewire, linux, bluetooth
Published: 2023-03-12 12:13:59

Quick Note to myself the community:

I recently replaced PulseAudio with PipeWire. Or, to be precise, I had to replace it because Gnome now has some depdencies on it.

Unfortunately, my BlueTooth headset did not work, any longer. It connected but did not show in Gnome's sound settings. I had some kernel updates pending, so my expectation was it would be resolved after a restart. 

But, nay.....!

TLDR; I did the following:
```
systemctl --user restart pipewire
sudo systemctl restart bluetooth
```

That worked. Maybe I'll have to do the same thing on next reboot ... I hope not ;-)
Bison: A Tool for Generating Parsers
Published: 2023-03-12 12:12:14


Bison is a parser generator tool that can be used to automatically generate parsers for input languages such as programming languages, configuration files, and markup languages. In this blog post, we'll take a closer look at what Bison is, how it works, and some of its features.

**What is Bison?**

Bison is a tool that allows you to specify the grammar of an input language in a formal specification language called yacc. Once you have specified the grammar, Bison can automatically generate a parser in C or C++ that can recognize the syntactic structure of input written in that language.

**How does Bison work?
**
Bison works by taking a description of the grammar of the input language in the form of a yacc specification. The yacc specification defines the rules that govern how the language is constructed, including the tokens that make up the language and the relationships between those tokens.

Bison uses the yacc specification to generate a parser in C or C++ that can recognize the syntactic structure of input written in the input language. The parser is generated as a set of functions that can be compiled and linked into a larger program.
**
What are some features of Bison?**

Bison has a number of features that make it a powerful tool for generating parsers. Some of these features include:

Automatic error handling: Bison can automatically generate code to handle syntax errors in the input language, making it easier to write robust parsers.
Customizable output: Bison allows you to customize the output of the generated parser, including the names of the generated functions and the structure of the parse tree.
Support for multiple input languages: Bison can generate parsers for a wide range of input languages, including programming languages, configuration files, and markup languages.
Support for multiple output languages: Bison can generate parsers in C or C++, making it a flexible tool that can be used in a wide range of programming environments.
Integration with other tools: Bison can be integrated with other tools such as Flex, a lexical analyzer generator, to provide a complete toolchain for generating compilers and interpreters.
**Conclusion**

Bison is a powerful tool for generating parsers for input languages such as programming languages, configuration files, and markup languages. It allows you to specify the grammar of the input language in a formal specification language called yacc, and then generates a parser in C or C++ that can recognize the syntactic structure of input written in that language. With its automatic error handling, customizable output, and support for multiple input and output languages, Bison is a versatile tool that can be used in a wide range of programming environments.

[Apache-Age:-https://age.apache.org/](https://age.apache.org/)
[GitHub:-https://github.com/apache/age](https://github.com/apache/age)
This blog changes its theme every day
Tags: hugo, githubpages, githubactions, blog
Published: 2023-03-12 15:34:22

---
title: This blog changes its theme every day
published: true
date: 2023-03-12 12:01:56 UTC
tags: hugo, githubpages, githubactions, blog
canonical_url: https://joaomagfreitas.link/this-blog-changes-its-theme-every-day/
---

Minimalistic blogs may get boring sometimes. We want to reduce visual polution, but our brain needs some visual sugar from time to time! That's why I configured a workflow for this blog that changes its theme color every day. Today you're seeing this color (yellow), but tomorrow you might see this color (red).

## How

If you have read my [about](https://joaomagfreitas.link/) page, you know that this blog is built with the following stack: Hugo, Bear Blog Theme and GitHub Pages. Content is published to the web whenever my pages GitHub repository is updated, triggered by a GitHub Action.

The process to update theme color is seemingly the same: have a GitHub Action that is triggered every day by midnight.

```yaml
name: update-theme-color

on:
  schedule:
    - cron: "0 0 * * *"

jobs:
  cron:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true # Fetch Hugo themes (true OR recursive)
          fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

      - name: Change color
        run: bash scripts/update_theme_color.bash

      - name: Commit and push
        run: bash scripts/action_repo_commit_and_push_all.bash "Update theme color"

```

But how is each color chosen? Initially I thought that randomizing a color using the updating date as a seed (e.g., `2023-03-12`), but then I remembered that could lead to undesirable situations such as:

- (#FFFFFF) "really light" text on light theme
- (#000000) "really dark" text on dark theme
- (#4A412A) or even this! (light theme users, can you point the differences?)

To overcome this issue, I decided that the best option is to handfully pick a set of colors and then choose at random one of them. All I needed to do is create a source of great colors

```text
#F94144
#F3722C
#F8961E
...
#A9DEF9
#E4C1F9
```

and then use bash scripting commands to chose one from the source and updated it in my blog `config.toml` file.

```bash
#!/usr/bin/env bash
script_dir_path=$(dirname "$(realpath $0)")

colors_file_path="$script_dir_path/good_colors.lst"

random_color=$(shuf -n 1 $colors_file_path)

config=$(awk '{sub(/link_color.*/, "link_color = \"'$random_color'\"")}1' config.toml)

echo "$config" > config.toml
```
How do I install Python packages in Google's Colab?
Published: 2023-03-12 11:42:06



How do I install Python packages in Google's Colab?

imagine yoiu want to install two different packages into your collab-account:

so you are wanting to create a setup to install these two packages in the Google's Colab;

**idea**:  You can use !setup.py install to do that.

**we can say**: Colab is just like a Jupyter notebook. 
Therefore, we can use the ! operator here to install literally any package in Colab.

What it actually does is, it tells the notebook cell that this line is not a Python code, its a command line script. So, to run any command line script in Colab, just add a ! preceding the line.

let us say for example: !pip install panda. 

This will treat that line (here pip install panda) as a command prompt line and not some Python code. 
but be carefully: if you do this without adding the ! preceding the line, it'll throw up an error saying "invalid syntax"

nowadays we can do this with a even simpler approach: just use the !pip magic, like:

```!pip install scipy```

**explanation**: That little code snippet will automatically use the correct Python version. 
**that said**: using pip is allways a good choice: but be aware: using !pip might be tied to a different version of Python,
c ++ syntax
Published: 2023-03-11 13:54:57

SYNTAX - bu nimaligini tushunishdan oldin ushbu kodga nazar tashlasak:

```
#include <iostream>
 using namespace std;
  int main() 
   
   { cout << "Hello World!;

    return 0;
     }
```

 `#include <iostream>`
`#include` - ya'ni chaqirmoq.Kut`ubxonani #include yordamida chaqiramiz.`
`<iostream>` - Bu kutubxona kutubxonalar turlicha bo'ladi.Va `<iostream>` kutubxonalarning faqat bittasi xolos.
`iostream` - input output stream - manosi kiritish chiqarish oqimi.

`using namespace std;` 
`using namespace std;` - manosi "std" ni qo'llash.

- vazifasi - kod boshidagi std qo'shimchasini avtomatik tarzda yozib beradi.Bu orqali siz malum bir vaqtingizni tejashingiz mumkin.Agar qanday ishlashini tushunmasangiz shunchaki xar bir kodingiz  davomida kutubxona tagiga yozib qo'ya qoling.

C++ dasturida har doim paydo bo'ladigan yana bir narsa bu `int main()` funksiyasi deyiladi.figurniy qavs `{}` ichida hamma kod yoziladi.figurni qavs tashqarisida yozilgan kod doim xato`error` beradi.

`return 0;` bu funksiya shunchaki kodda bo'ladi deb tasavvur qiling.

har bir qator kod tugallanganda `;` belgisi bo'lishi shart
Galaxia Studios: Revolutionizing the Web3 Gaming Industry
Tags: blockchain, web3, gamedev, onchain
Published: 2023-03-12 11:09:32


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c0ayyaudz1yckj3vqidk.jpg)


Galaxia Studios is a trailblazing startup that is taking the gaming industry by storm. The company is making waves in the emerging Web3 gaming space by creating fully on-chain games and applications that utilize blockchain technology to provide a truly decentralized gaming experience.

The team at Galaxia Studios is made up of talented developers, designers, and gaming experts who are passionate about pushing the boundaries of what is possible in the gaming world. They are united by a shared vision of creating games and applications that are not just fun and engaging, but also fair, transparent, and secure.

The company’s flagship product, Galaxia Games, is a collection of fully on-chain games and applications that can be played on various Web3 platforms. These games are built on the Polygon blockchain (and soon, they will be available on more EVM-compatible chains), ensuring they are completely transparent and tamper-proof. Players can be confident that their game progress and achievements are stored securely on the blockchain.


Galaxia Games has already achieved significant success in the Web3 gaming space. One of its games, “Aquatic Wars”, achieved 1st Place on the Polygon network, while another product they created, “Apes 2 Punks” ,won an ETH-Global hackathon for its innovative use of blockchain technology.

In addition to Galaxia Games, the company has several other products in development, including a new game that promises to bring even more innovation and excitement to the Web3 gaming space. Galaxia Studios is also exploring new applications for blockchain technology in the gaming industry, such as new blockchain infrastructures and new ways to use dNFTs.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ga6a0sptppufj3yt5m7b.jpg)

Galaxia Studios is a fully on-chain gaming company that is pushing the boundaries of what is possible in the web3 gaming space. By leveraging blockchain technology, the team at Galaxia Studios is creating immersive gaming experiences that are secure, transparent, and open to players around the world. The company has already released several successful games and applications, and is constantly working on new projects that will help to drive adoption of the web3 ecosystem. With a deep understanding of the challenges and limitations of blockchain technology, Galaxia Studios is uniquely positioned to deliver innovative solutions that are tailored to the needs of gamers and developers alike.

The team at Galaxia Studios is excited about the future of Web3 gaming and is committed to being at the forefront of this rapidly-evolving industry. By combining cutting-edge technology with compelling game design and a focus on fairness and transparency, Galaxia Studios is poised to revolutionize the gaming industry and create a new era of decentralized gaming.
World first app, which is built by using chatGPT
Tags: chatgpt, android, ai, news
Published: 2023-03-12 11:04:18

This is an android app called “[Oceans of AI](https://play.google.com/store/apps/details?id=in.blueplanetapps.oceansofai)” that is written in kotlin by using chatGPT prompts. this article will tell you the story about it and also provide the [link to a full video](https://www.youtube.com/watch?v=b7d0c3DXhaU) of chatGPT prompts, so you can see how it's built

## How it’s started:
Idea: I was looking for an idea that will be useful, according to trends, and easy to build. And because ai tools are trending and I wanted to build an app by using Artificial intelligence so I thought maybe I should build an [app that contains lots of ai tools](https://play.google.com/store/apps/details?id=in.blueplanetapps.oceansofai) that people can use to do their job fast by using Artificial intelligence tools

chatGPT work: Like other people, I just go and say my idea to see if it can create but we can’t create a full app like that because of chatGPT limits this is not the right approach to follow. so I tried to build it like developers. so I started following a step-by-step process to build this. I started with creating fragments and like that one by one, I build every other feature and complete the whole [app](https://play.google.com/store/apps/details?id=in.blueplanetapps.oceansofai). you can see all the prompts and code provided by chatGPT in this [video](https://www.youtube.com/watch?v=b7d0c3DXhaU)

Ok, so what about Backend?

Yes. This is also created by using chatGPT

The app is available on the [Google Play Store](https://play.google.com/store/apps/details?id=in.blueplanetapps.oceansofai), and a full video of the implementation is available on [Youtube](https://www.youtube.com/watch?v=b7d0c3DXhaU)

Thank You for reading. I hope it will help developers, how they can build their projects fast and understand the power of AI.
What is JSON?
Tags: webdev, programming, tutorial, opensource
Published: 2023-03-12 10:49:41

_Javascript object notation (JSON) is a standard text-based data format used in web development to send and receive data._

_API is an application programming interface designed for lightweight data interchange (text-based data exchange format) between two computer applications operating on the same hardware device or between different computers in different geographical areas._

_The format is to transfer data from client to server and server to client._

## Example:
I am login with the Facebook application (client side), when I click my profile page, that time the application sends a request to the Facebook server(server side) and gives me the response in a format like JSON.

## Advantage:

1. It is supported by all programming languages.
2. It can be used on all platforms.
3. It is a lightweight database standard, so data transmission is fast.

## Where JSON Is Used:

1. Web Application
2. API's
3. Mobile application
4. Gaming Api's
5. IOT

## Data Type Supported:

1. String
2. Number
3. Array
4. Null
5. Boolean
6. Object

## JSON Syntax and Datatype:

1. Every piece of JSON data is enclosed in curly brackets.
2. Key-value pairs are used to describe JSON data.
3. Always surround the word "key" in double quotes.
4. Keys and values must always be separated by a comma (:).
5. Values should be expressed correctly; double quotes for Strings are
6. preferred over Boolean quotes for Numbers.
7. Commas (,) should be used to divide text.
8. Curly braces should be used for objects and collection square brackets.

```
[
  {
      "id": 1,
      "name": "test",
      "email": "test@gmail.com",
      "status": "active",
      "class": {
          "id": 1,
          "name": "1st",
          "sub_class": {
              "id": 1,
              "name": "A"
          }
      }
  },
    {
      "id": 1,
      "name": "test",
      "email": "test@gmail.com",
      "status": "active",
      "class": {
          "id": 1,
          "name": "1st",
          "sub_class": {
              "id": 1,
              "name": "A"
          }
      }
  }
]
```

## JSON Array Declaration:

```
[
  "computer_science", "mechanical_engineer", "electrical_engineer"
]
```

## JSON Object Declaration:

```
{
  "id": 1,
  "name": "test",
  "class": "1st",
  "dob": "1970-02-15"
  "certicate_achieve": ["rest_api", "json", "ruby"]
}
```

## Converting JSON Text to a JavaScript Object:

1. JSON.parse(): Take the JSON string and convert it into a javascript object.
2. JSON.stringify(): convert JavaScript object(JSON) into JSON string(useful while sending over the network)

```
// JSON.stringify()
obj = {"id":1, "name": "test"}
{id: 1, name: 'test'}
JSON.stringify(obj)
'{"id":1,"name":"test"}'

// JSON.parse()
data = JSON.stringify(obj)
'{"id":1,"name":"test"}'
JSON.parse(data)
{id: 1, name: 'test'}

```
I'm launching Purrfect AI・Photo Studio for "sweet" budget photoshoot 😻
Published: 2023-03-12 10:45:25

Product Hunt: https://www.producthunt.com/posts/purrfect-ai-photo-studio
Website: https://purrfect.ai/

Hi everyone,

📸 Say cheese! 🧀 
Our new Purrfect AI・Photo Studio is here and we're excited to offer you a "sweet" budget photoshoot experience!😻 
https://producthunt.com/posts/purrfect-ai-photo-studio by 
@PurrfectAI 

Would love to have your support on Product Hunt! ❤️

Thank you all so much 🤗
Container Query
Published: 2023-03-12 10:41:51

In today's world, modern web apps must be able to adapt to various devices and screen sizes. While Media Queries are helpful, ensuring they work well across all screen sizes can be time-consuming.

This is where container queries come in, as they allow us to apply a micro layout approach to individual components. With container queries, a component can have all the details about its responsive behavior built-in, making it more suitable for component-based architecture designs. This means that instead of thinking about a component's behavior in terms of screen size, we can design it based on the size available to the component itself.

Let's consider the following screenshot,


![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pr0gn3gwd0iekj3wv4a4.png)
The two colored cards are the same component, which is being placed on different containers of different widths. As per normal behavior, the content in the card is trying to render in the same way, but due to the difference in the width available the UI breaks.

This is a typical example where we can apply the container queries going forward.


![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a2ips93oa7hdz1r34ua6.png)

To apply the container query on any component, we have to define the container for it. In this case, the `.column` class is the container for the `.card` (The colored card in the first image is denoted here with `.card` class).

The property called `container-type` is used to define the container and the value `inline-size` is used when the inline dimension of the container is in use.

Once the container instance is defined, the container query can be used similarly to media queries, which we are already familiar with. This allows for the creation of different behaviors for the same component based on different container sizes.


![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6nhrceddj8t2s6qn92vo.png)

And That's about it!

Thanks for reading and until the next time.