teleren/devto huggingface dataset:
Good app ideas 💡
Tags: webdev, opensource, development
Published: 2023-07-12 02:04:13

Hello 👋 

So I've had a ton of free time this past week and I've just wanted to code something. I've coded things from custom ai classifiers to full on programming languages and I miss that exciting feeling of getting something new to work.

If anyone has any interesting ideas, please let me know. It can be anything from a good web app to a new api. Also, I want to get experience working with people on projects like this so feel free to talk to me about working together 💪
How to export data from Apache AGE
Tags: apacheage, programming, postgres, learning
Published: 2023-07-12 01:55:55

## **Introduction**
Exporting data from Apache AGE, an extension of PostgreSQL for graph data, can be a valuable task when you need to analyze or share your graph data with other systems. In this blog post, we will explore the process of exporting both edges and nodes from Apache AGE using the COPY command. By following the steps outlined below, you'll be able to export your graph data into CSV files for further analysis or integration.

## **Exporting Edges**
To export edges from Apache AGE, you can utilize the COPY command with a Cypher query. The following command allows you to export the edges to a CSV file:
`COPY (SELECT * FROM cypher('graph_name', $$
    MATCH (a)-[e]->(b)
    RETURN start_id(e), label(a), end_id(e), label(b) $$)
    AS (start_id agtype, start_vertex_type agtype, end_id agtype, end_vertex_type agtype)
) TO '/path_to_csv/edges_graph.csv' DELIMITER ',' CSV HEADER;`

This command executes a Cypher query that retrieves the desired edge information from the specified graph name. It selects the start ID, start vertex label, end ID, and end vertex label. The results are then written to a CSV file specified by the file path '/path_to_csv/edges_graph.csv' with a comma delimiter and a header row.

## **Exporting Nodes**
Exporting nodes from Apache AGE requires manually retrieving the node properties and defining the column list as the CSV header. Let's assume we have a person vertex with properties like id, name, and age. To export this vertex, follow the code snippet below:

`COPY (SELECT * FROM cypher('graph_name', $$
    MATCH (a)
    RETURN a.id, a.name, a.age $$)
    AS (id agtype, name agtype, age agtype)
) TO '/path_to_csv/person_vertex_graph.csv' DELIMITER ',' CSV HEADER;`
In this example, we execute a Cypher query that matches all nodes of the desired type (person). The query retrieves the node's ID, name, and age properties. The results are then written to a CSV file specified by the file path '/path_to_csv/person_vertex_graph.csv' with a comma delimiter and a header row that lists the column names.

## **Conclusion**
Exporting data from Apache AGE is a straightforward process that allows you to extract graph data and save it in CSV format. By utilizing the COPY command and crafting appropriate Cypher queries, you can export both edges and nodes from your Apache AGE graph database. This exported data can then be utilized for various purposes, such as further analysis, integration with other systems, or sharing with collaborators.

## **Contribute**
[Apache AGE repository](https://github.com/apache/age)
[Apache AGE website](https://age.apache.org)
supabase timezone + cron
Tags: supabase, cron, timezone
Published: 2023-07-12 01:14:35

cron으로 한국시간 자정에 호출을 해야한다. 

일단 `alter database postgres set timezone to 'Asia/Seoul';` 으로 supabase의 시간을 kst로 변경했다. 
이렇게하면 created_at이 `2023-07-11 00:05:00 + 00` 이 `2023-07-12 09:05:00 +09` 로 표시되는 것 말고는 차이점을 모르겠다. 

kst로 변경했지만, cron이 호출되는 시간은 utc로 해야하는데, 이러면 자정에 실행해야할 작업을 utc를 기준으로 해야할지 kst를 기준으로해야할지 모르겠으니 테스트를 해본다. 


cron에서 실행되는 시간을 utc기준으로 설정한다. test2 테이블에 현재 시간과 날짜를 넣는다. 

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


호출 결과를 보니 kst 자정에 실행됐다. 

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


test2 테이블에 입력된 날짜는 kst다!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/baj3ilnkyg1tnzdswkv8.png)
Using SoundScribe to Maximize Your Writing Productivity
Tags: soundscribe, ai, contentwriting, writing
Published: 2023-07-12 00:50:57

As a content creator, every second of your day counts. Each moment is an opportunity to create, expand, and refine your ideas. Let's face it though, writing is time-consuming. Between formatting, grammar checks, and the ever-present specter of writer’s block, transforming your ideas into engaging content can often feel like an uphill trek. But what if you had a powerful tool, an AI-powered system called SoundScribe, designed to streamline the process?

Rather than staring at a blank page as minutes tick by, [Soundscribe](https://soundscribe.app) allows you to record your thoughts directly into your browser. Just speak, and allow the system to capture those ideas as they spring into existence. Not just ideas recorded within your workspace, either. With an upcoming mobile app feature, you can capture those bursts of creativity wherever inspiration strikes, ensuring no idea slips away unnoticed.

But [Soundscribe](https://soundscribe.app) doesn't just transcribe. Taking its support a notch higher, it leverages AI technology to analyze the tone and pacing of your speech. The process feels as natural and swift as having a conversation with a friend, free-flowing and unscripted. Yet, in your words and speech, our system identifies the unique cadences that differentiate your voice, ensuring that your essence is not lost in the transition from the spoken to the written word.

The result: a draft rich with your own distinctive touches, that only needs a final layer of polish before it's ready for your audience. It won't be surprising if you find your content production process becoming much more efficient.

So, how can you integrate [Soundscribe](https://soundscribe.app) into your existing writing routine? Start by recording quick thoughts as they come to you, then let [Soundscribe](https://soundscribe.app) handle the transcription in the background. You can return to the tool whenever you choose, to find your thoughts transcribed and waiting for you.

This is where you come in to add the finishing touches. Delete parts that don't work, expand on interesting points, and make sure everything is in the right place. Think of [Soundscribe](https://soundscribe.app) as a virtual writing partner that never tires, ready to listen and capture your thoughts at a moment's notice.

In essence, [Soundscribe](https://soundscribe.app) combines the freedom of conversation with the discipline of writing. It takes care of the heavy lifting, transcribing and organizing your spoken thoughts so that you can focus on the big picture – refining and polishing your narratives into compelling, high-quality content.

Jumpstart your writing productivity today with SoundScribe because every word matters and every moment counts.

Join to [the waitlist now](https://soundscribe.app).
Bandit Level 2 Level 3
Tags: writeup, overthewire, ctf, bandit
Published: 2023-07-12 00:47:00

### Introduction

Bandit3 is the fourth level of the OverTheWire Bandit wargame. In this level, we will learn how to handle filenames with spaces in them and how to read the contents of a file with a space in its name. By completing this level, we will gain access to the password for the next level.

### Steps

1. Open your terminal application.
2. Enter the following command to ssh into the remote server:

```
ssh bandit2@bandit.labs.overthewire.org -p 2220
```

1. You will be prompted to enter a password. Enter the password from the previous level, "rRGizSaX8Mk1RTb1CNQoXTcYZWU6lgzi", and hit enter.
2. You are now connected to the remote server and are able to execute commands.
3. Enter the following command to search for files with spaces in their name:

```
find /home -name "spaces in this filename" 2>/dev/null
```

1. The output should show the path to the file with spaces in its name. In this case, the path is /home/bandit2/spaces in this filename.
2. Enter the following command to read the contents of the file:

```
cat "/home/bandit2/spaces in this filename"
```

1. The output should show the password for the next level: aBZ0W5EmUfAf7kHTQeOwd8bauFJ2lAiG.

Congratulations! You have successfully completed Bandit3 and gained access to the password for the next level.

### Conclusion

In this level, we learned how to handle filenames with spaces in them and how to read the contents of a file with a space in its name. These are important skills to have when working with files in Linux command line, and mastering them will be useful for solving future levels in the OverTheWire Bandit wargame.
Conquering iOS, Android and Web with Hotwire
Tags: android, turbo, ios, rails
Published: 2023-08-21 10:32:52

---
title: Conquering iOS, Android and Web with Hotwire
published: true
date: 2023-07-12 00:00:00 UTC
tags: android, turbo, ios, rails
canonical_url: https://williamkennedy.ninja/hotwire/2023/07/12/conquering-ios-android-and-web-with-hotwire/
---

<iframe width="560" height="315" src="https://www.youtube.com/embed/JvGC9DUZ-ck" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></iframe>
Deploying a Node.js application in ECS with CodeCatalyst and Terraform
Published: 2023-07-11 23:39:47

In this step-by-step guide, I'll walk you through the entire process of deploying a Node.js application in ECS Fargate with CodeCatalyst as CI/CD tool and Terraform as IaC. From setting up your environment to configuring your containers and services, we'll cover everything you need to know to get your application up and running in no time. So whether you're new to cloud deployment or just looking for a more streamlined process, this guide is for you. Let's get started!

**Prerequisites**
You will need the following :
- NPM to build and run the app locally
- Docker to build and test your image
- Terraform to create infrastructure in AWS
- AWS account + AWS Builder ID (for CodeCatalyst)

**Note:**
If you interested only in part of Creating CI/CD pipeline in CodeCatalyst please go to step # 4

## **Step 0 [Optional] Build and run app locally.**
Feel free to skip if you already have existing node.js app.
Create the following files:
- src/app.js main app file in the src folder
- package.json that includes dependencies

```
// Import the express module
const express = require('express');

// Create an instance of express
const app = express();

// Define a port
const port = 3000;

// Define a route
app.get('/', (req, res) => {
  res.send('Hello, World!');
});

// Start the server
app.listen(port, () => {
  console.log(`Server is running at http://localhost:${port}`);
});
```

[My example code ](https://github.com/nbekenov/nodejs-example-app/commit/9d13af1a3e23d0e767c6c2cc853af0c6872071fe)

Now you can build and run your app locally

```
npm install
npm run build
npm test
npm start
```

## **Step 1 - Containerize the app**
Let's create Dockerfile

```
# Use an official Node.js runtime as a parent image
FROM node:20-alpine

# set the current mode
ENV NODE_ENV=production

# Set the working directory to /app
WORKDIR /usr/src/app

# Copy the application code to the container
COPY --chown=node:node . .

# Install the dependencies
RUN npm ci --only=production

# Expose the port that your application listens on
EXPOSE 3000

USER node

# Start the application
CMD ["node", "src/app.js"]
```
Now you can run your app in Docker

```
docker build -t test:latest .
docker run -p 3000:3000 test:latest
```

## **Step 3 - Create Infra**
We are going to implement the following architecture using Terraform and open source modules.

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

First you will need to bootstrap your account:
- create S3 and DynamoDB table for Terraform State file
- create ECR
- create IAM roles and policies for CodeCatalyst

More details in the [readme](https://github.com/nbekenov/nodejs-example-app/tree/main/iac/bootstrap)

Then [IaC for app](https://github.com/nbekenov/nodejs-example-app/tree/main/iac/app_infra)

## **Step 4 - create Pipeline**
1. [create AWS Builder ID](https://docs.aws.amazon.com/signin/latest/userguide/create-aws_builder_id.html)
2. Log into CodeCatalyst and create new space and project
3. Connect AWS accounts
4. Create environments
Let me tell you something about sudo(superuser do) and root user( Oga kpatapkata of them all)
Published: 2023-07-11 23:38:14

The sudo client and root client are the two ideas connected with client honors and access control in a Unix-like working framework. Here is a clarification of the contrast between the two:

Root User/Client:

The root client, otherwise called the superuser or chairman, has unlimited oversight and unhindered admittance to all documents, indexes, and orders on a framework.
The root client can play out any activity, change framework settings, introduce programming, make and erase client accounts, and execute touchy regulatory errands.
Because of the broad honors, the root client can possibly roll out huge improvements to the framework, which can be both gainful and hazardous.
It is by and large prescribed to restrict the utilization of the root record to fundamental framework organization undertakings and utilize a normal client represent ordinary exercises.
Sudo Client:

The sudo (another way to say "superuser do") client is a customary client who has been conceded transitory managerial honors.
With the sudo order, a sudo client can execute explicit orders with root-level consents by giving their own secret phrase.
The sudo client is ordinarily allowed consents by the framework executive to perform explicit undertakings that require raised honors.
By utilizing sudo, the framework can implement a more granular access control system, permitting various clients to have various degrees of access in view of their doled out honors.
This approach further develops security since it diminishes the requirement for clients to sign in as the root client straightforwardly.
In rundown, the root client is a definitive superuser with full command over the framework, while a sudo client is an ordinary client who can briefly acquire raised honors to perform explicit regulatory undertakings utilizing the sudo order. The utilization of sudo further develops security by permitting fine-grained admittance control and restricting the utilization of the root record to fundamental framework organization undertakings.
Vue.js Setup for beginner
Tags: vue, javascript, tutorial
Published: 2023-07-11 22:58:25

To set up a Vue.js project, you'll need to follow these steps:

Step 1: Install Node.js and npm

Vue.js requires Node.js and npm (Node Package Manager) to be installed on your system. You can download and install Node.js from the official website: https://nodejs.org/

Step 2: Install Vue CLI

Vue CLI is a command-line tool that helps you scaffold and manage Vue.js projects. To install Vue CLI, open a terminal or command prompt and run the following command:


```
npm install -g @vue/cli
```


Step 3: Create a new Vue project
Once Vue CLI is installed, you can create a new Vue project using the following command:

```
vue create project-name
```


Replace "project-name" with the desired name for your project. This command will prompt you to choose a preset for your project. You can either select the default preset or manually select features based on your project requirements.

Step 4: Navigate to the project folder
After the project is created, navigate to the project folder using the following command:

```
cd project-name
```


Step 5: Run the development server
To start the development server and see your Vue.js project in action, run the following command:

```
npm run serve

```

This command compiles the project and starts a development server. You can access your Vue.js application by opening your web browser and visiting the URL provided in the terminal.

That's it! You have successfully set up a Vue.js project using Vue CLI. You can now start building your application by modifying the files in the project directory.
Dzień 1 - historia Azure, Big Data
Published: 2023-07-11 22:49:25

---
title: Dzień 1 - historia Azure, Big Data
published: true
---

Uff. Siedzę już od tygodnia nad historią Azure. Najciężej jest znajdywać źródła dla wszystkich stwierdzeń oraz faktyczną oś czasu wprowadzanych usług. Strona Microsoftu nie pomaga, chociaż jak już się dokopać do ich bloga to można znaleźć daty, kiedy ogłaszali nową usługę.

Zostały mi trzy tygodnie na ukończenie pracy. Staram się dodawać nowe rzeczy każdego dnia. Nie mam pojęcia ile jeszcze mi zajmie szlifowanie tekstu.

Z rzeczy które mam do zrobienia, a mam ich kurde dużo:

1. Napisać faktyczny tekst wstępu do inżynierki - pomimo tego że mam całe 50 stron tekstu, duża jego część nie nadaje się do publikacji jako zerżnięta z innych źródeł. Jedynym rozwiązaniem jest bardzo dużo czytać i stworzyć faktyczną kompilację tego co się dowiedziałem w postaci osobnych paragrafów. Na razie nie dbam o styl. Chcę mieć tekst. Potem będę usuwał wszelkie neologizmy i błędy gramatyczne.

2. Dokończyć stronę internetową. No więc wszystko jest pięknie i fajnie, ale moja strona internetowa tak naprawdę jeszcze nie działa. To nie jest aż tak bardzo istotne jak mogłoby się wydawać, ponieważ duża część mojej pracy polegała na składaniu do kupy innych elementów. Ale faktycznie wolałbym mieć gotowe rozwiązanie, a nie coś co powinno działać a nie działa.

3. Należy doszlifować wykresy w Power BI. One są niby w porządku, ale nie są tak naprawdę przejrzyste, obawiam się że nikogo nie przekonają.

4. Przygotować listę pytań - całe założenia pracy polegają na tym, że chcę, wzorem Roslinga, wykazać brak wiedzy na temat świata u przeciętnego odwiedzającego stronę.

5. Dokończyć opis wykonania zadania. W zasadzie jest to jedyna część pracy która jest autorska. Tak ją zostawmy, ale trzeba ją jeszcze doszlifować.
Strategies for Optimizing Costs in AWS: Maximizing Cost-efficiency for Cloud Resource Management
Tags: awscloud, costoptimization, cloudcostsavings, cloudinfrastructure
Published: 2023-07-11 22:49:14

**Introduction:**
In today’s cloud-centric world, optimizing costs is a key priority for businesses leveraging Amazon Web Services (AWS). Effective cost management not only ensures financial efficiency but also enables organizations to allocate resources strategically. In this blog post, we will delve into advanced strategies and best practices for cost optimization in AWS, providing valuable insights for both beginners and experienced cloud practitioners.

**I. Analyzing Cost Drivers:**
To embark on an effective cost optimization journey, it’s crucial to identify the key factors driving AWS costs. We will explore the AWS Cost Explorer tool, delve into cost allocation tags, and leverage AWS Cost Anomaly Detection to gain visibility into cost drivers and anomalies.

**II. Right-Sizing Resources:**
Right-sizing plays a significant role in maximizing cost-efficiency. We will discuss techniques to analyze resource utilization using AWS Trusted Advisor and CloudWatch. Furthermore, we’ll delve into instance families, sizing options, and explore AWS Compute Optimizer to recommend optimal instance types.

**III. Leveraging Reserved Instances and Savings Plans:**
Reserved Instances (RIs) and Savings Plans are powerful tools for cost optimization. We’ll cover various purchasing options, such as Standard RIs, Convertible RIs, and explore Savings Plans. Additionally, we’ll examine strategies to optimize RI coverage, including modifications, exchanges, and regional benefits.

**IV. Implementing Auto Scaling and Spot Instances:**
Dynamic resource allocation through Auto Scaling and Spot Instances is essential for cost optimization. We’ll explore the concepts, benefits, and best practices of Auto Scaling, as well as the cost-saving potential of Spot Instances. We’ll also discuss Spot Fleet and Spot Instance interruption handling strategies.

**V. Utilizing AWS Cost Management Tools:**
AWS offers a suite of cost management tools that can significantly contribute to cost optimization efforts. We’ll explore AWS Budgets, AWS Cost Explorer, and AWS Cost and Usage Reports. Additionally, we’ll discuss the benefits of integrating AWS Cost Management with third-party tools and services for advanced cost visibility and governance.

**Conclusion:**
Cost optimization in AWS requires a proactive approach and a deep understanding of various strategies and tools. By analyzing cost drivers, right-sizing resources, leveraging RIs and Savings Plans, implementing Auto Scaling and Spot Instances, and utilizing AWS cost management tools, organizations can achieve maximum cost-efficiency while maintaining high performance and scalability. Embrace these best practices and unlock the full potential of AWS cost optimization in your cloud journey.

Remember, optimizing costs is an ongoing process. Continuously monitor, analyze, and fine-tune your cost optimization strategies to stay ahead of the curve and maximize the value of your AWS investment.
Dzień 2 - usługi Azure
Published: 2023-07-11 22:48:53

---
title: Dzień 2 - usługi Azure
published: true
---

Chwilowo zarzuciłem rozwijanie historii Azure, natomiast udało mi się skupić na opisywaniu podstawowych usług Azure. Słuchałem dzisiaj sporo na temat usługi Azure Space i Azure Orbital, które wydają się być absurdalnie niesamowite, do momentu kiedy zaczynam sie zastanawiać po co one komu są. Rzekomo możnaby z tego skorzystać do pomiaru wzrostu, np. upraw, bądź siedlisk ekologicznych, być może też zarządzania transportem. Widzę potencjalne zastosowanie dla trackowania polskich pociągów w bardziej sukcesywnym przewidywaniu ich przyjazdu, jednak myślę że byłoby tutaj dość sporo pracy.

Ok, podsumujmy rzeczy które dalej trzeba wykonać.

1. Muszę dokończyć historię Azure aby był to jakiś porządny podrozdział. Urwał się dość niespodziewanie, jakby (i jest to prawda) zabrakło mi sił na jego dokończenie.
2. Muszę zacząć rozdział na temat Power BI.
3. Muszę zacząć rozdział na temat ASP.NET.
4. Muszę zacząć rozdział na temat DevOps. Terraforma nawet nie ruszałem, więc jest tutaj sporo do zrobienia.
5. Muszę dokończyć stronę internetową.
6. Muszę ułożyć pytania na stronę internetową.
7. Muszę uzupełnić bazę danych o zbieranie ankiet na temat wyników użytkowników... tudzież odpuścić sobie ten element. Jeszcze nie jestem pewien.
8. Muszę dokończyć opis wykonanego zadania.
9. Muszę oczyścić całą pracę aby była ona bardziej publikowalna. Jak na razie pisany ostatnio tekst jest bełkotem, często bez sensownego cytowania, ale ma jedną zaletę - jest mój osobisty, a nie zerżnięty z podręczników i zewnętrznych źródeł. W ten sposób mogę go bez stresu publikować, najwyżej zostanie odrzucony/poprawiony.