teleren/devto huggingface dataset:
Lend Some Money - Hard money lending for real estate investors
Tags: loans, fintech
Published: 2022-08-26 21:02:10

Lend Some Money is a national private lender that makes hard money commercial loans for the refinance or purchase of non-owner-occupied residential and mixed-use commercial properties.

Its industry-leading technology platform allows it to provide real estate investors and brokers with fast, easy funding at competitive rates for fix & flip, new construction, and both short and long-term rental properties.

[https://lendsomemoney.com](https://lendsomemoney.com)
Web based code Editor
Tags: codepen
Published: 2022-08-26 20:55:55

<p>This is a simple web based code editor. Click on the menu items on the top and write pure HTML, CSS and JavaScript. Click the 'Run' Button and see the results that are being displayed on the right section.</p>

{% codepen https://codepen.io/harunpehlivan/pen/xxWoKrV %}
Starting my Python Journey!
Tags: python, beginners, devjournal
Published: 2022-08-26 20:51:45

I am now in 9th grade and I thought it would be a good time to start a blog. I learned the basics with the beginner Python series from NetworkChuck(YouTube), his Python tutorial explains strings, variables, lists and much more. his tutorial is VERY good check him out if your just starting. As I said I'm now in now in 9th grade and I have chosen to choose "Fundamentals of Programming" as a elective and I wish to spread the things I learn along the way!
NGINX REQ/SEC: parse log
Tags: nginx
Published: 2022-08-26 20:45:00

The output of the above-given command will sort out all of the requests while putting a timestamp with each of them. Here, the first number represents the request count:

```
sudo cat /var/log/nginx/access.log | awk '{print $4}' | uniq -c | sort -rn | head
```

```
    683 [26/Aug/2022:04:04:32
    642 [26/Aug/2022:05:59:46
    629 [26/Aug/2022:05:01:55
    604 [26/Aug/2022:07:53:47
    556 [26/Aug/2022:15:02:34
    551 [26/Aug/2022:06:57:02
    548 [26/Aug/2022:08:48:05
    521 [26/Aug/2022:09:37:22
    466 [26/Aug/2022:07:53:46
    447 [26/Aug/2022:15:02:35
```
Do "Future you" a favour and setup your "indie project boilerplate"
Tags: nextjs, startup, webdev, javascript
Published: 2022-08-26 20:19:54

As a developer, how many times have you been asked:

> "How long would it take to make <insert-random-side-project-idea here>?".

I can't count the amount of times I relearned the lesson that these types of projects always take longer than expected to fully launch.

This recently happened to me when a friend brought up the idea of a "Fantasy Football Draft Order Generator", any my response was naively:

> "A few hours or so". 

_(You can checkout the final product [here](https://www.draftorders.com/). While it's very simple, I can promise it was more than a few hours.)_

I usually get started creating these projects using a tool like `create-next-app`. 

I'll add Typescript, Tailwind, a component library, wire up my site's layout, fiddle with flex-box in the footer, Figure out how external scripts should be loaded in Next JS , etc etc etc.

Many of these individual tasks are fairly trivial on their own, but it's often a death by 1000 cuts, where your "1 hour project" quickly turns into a whole ordeal. Before you know it, this trivial project starts eating into your evenings/weekends (or maybe you never get around to properly launching the project).

Do "future you" a favour...and create your own "Indie Boilerplate".

I've created mine here:
https://github.com/jamespohalloran/indie-boilerplate 

On my next hobby project I'll be able to get started with:

```
npx create-next-app@latest -e https://github.com/jamespohalloran/indie-boilerplate
```

I won't need to worry about dealing with:
- the site's layout (Let's face it, these usually aren't that unique)
- Configuring SEO meta fields
- Setting up Tailwind & my preferred component library (DaisyUI in my case)
- Adding my personal links to the footer
- Adding copyright info

I also even have my own "Indie Project Checklist" in the readme to keep me on track.

I hope this helps out "future you" on your next hobby project!

---

To follow along with more of my hobby projects, follow me on [twitter](https://twitter.com/jamespohalloran) & checkout my [portfolio site](https://johalloran.dev)
useState Hook
Tags: react, beginners, programming, tutorial
Published: 2022-08-26 20:05:44


![React Hooks useState](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wql0h3vd1syffbzwplsr.png)

**What Are Hooks?**

Hooks are new! It was a feature introduced in React 16.8. It allows you to use state and other React features without writing a class. Hooks are functions which "hook into" React features. It does not work inside classes.


**When Should I `useState` vs Props?**

Choosing whether to use state vs props comes down to "who owns this data?". If data is managed by one component, but another component needs access to that data, you'd pass the data from the one component to the other component via _props_.

If a component manages the data itself, it should use _state_ to manage it.



## Example

I'm going to show how to use state in a simple cookie clicker app.


**Declaring State**

```
import React, { useState } from 'react';

function Example() {
  // Declare a new state variable, which we'll call "cookies"
  const [cookies, setCookies] = useState(0);
```


**What Does Declaring State Do?**

It declares a “state variable” and a callback function. Our variable is called `cookies` but you could call it anything. The `setCookies` function will set the new value of `cookies`. This is a way to “preserve” some values between the function calls. Normally, variables “disappear” when the function exits but state variables are preserved by React.  We pass 0 into `useState` to set our "initial state".  Meaning our cookie clicker count will start at 0.


**How to Display Your Current State**

If we want to display the current amount of cookies that we have we can use `cookies` directly:

```
<p>You have {cookies} cookies!</p>
```


**How to Update State**


```
  <button onClick={() => setCookies(cookies + 1)}>
    Click for Cookie!
  </button>
```

## Thats it!

```
 1:  import React, { useState } from 'react';
 2:
 3:  function Example() {
 4:    const [cookies, setCookies] = useState(0);
 5:
 6:    return (
 7:      <div>
 8:        <p>You have {cookies} cookies!</p>
 9:        <button onClick={() => setCookies(cookies + 1)}>
10:         Click for Cookie!
11:        </button>
12:      </div>
13:    );
14:  }
```
- We import the `useState` hook from react.  This is how we keep track of state in our function.
- We declare state by calling our `useState` hook, assign our state variable and callback function a name, and initialize state by passing a 0 indicating that we start with no cookies.
- Then, when a user clicks the button, we call setCookies with a new value. React will then re-render the Example component, passing the new cookies value to it.
Primary Selection as a Plus
Tags: linux, clipboard, tools, nvim
Published: 2022-08-26 19:52:00

## Why Primary Selection?

Most people I see on the Internet, nvim users, usually give up "primary selection" by setting their clipboard to "unnamedplus". Those who use Linux since its beginning like selecting some text and hitting middle mouse button to have the text pasted somewhere else. 

If you can have two independent clipboards in your system why do not use it? Because in vim you can just type:

```viml
:reg *,+
```

The primary selection is represented by `*` and the clipboard by `+`. 

## Fix primary selection paste on firefox:

On my awesomeWM I have this code (line 05 to 09):

```lua
01 clientbuttons = gears.table.join(
02   awful.button({ }, 1, function (c)
03     c:emit_signal("request::activate", "mouse_click", {raise = true})
04   end),
05   -- paste primary selection Ctrl + button1
06   awful.button({ "Control" }, 1, function (c)
07     c:emit_signal("request::activate", "mouse_click", {raise = true})
08     awful.spawn.with_shell("xdotool click --delay 0 --clearmodifiers 2")
09   end),
10   awful.button({ modkey }, 1, function (c)
11     c:emit_signal("request::activate", "mouse_click", {raise = true})
12     awful.mouse.client.move(c)
13   end),
14   awful.button({ modkey }, 3, function (c)
15     c:emit_signal("request::activate", "mouse_click", {raise = true})
16     awful.mouse.client.resize(c)
17   end)
18 )
``` 

Even though I can not middle click on firefox to paste my primary selection I can now hold Ctrl + button1 to have it working again. 

## Primary Selection on neovim:

```lua
local function map(mode, lhs, rhs, opts)
	local options = { noremap = true, silent = true }
	if opts then
		if opts.desc then
			opts.desc = "init.lua: " .. opts.desc
		end
		options = vim.tbl_extend('force', options, opts)
        end
	vim.keymap.set(mode, lhs, rhs, options)
end


-- avoid clipboard hacking security issue
-- http://thejh.net/misc/website-terminal-copy-paste
-- inoremap <C-R>+ <C-r><C-o>+
map("i", "<C-r>+", "<C-r><C-o>+", { desc = 'fix terminal copy paste hack issue' })
map("i", "<S-Insert>", "<C-r><C-o>*", { desc = 'fix terminal copy paste hack issue' })

-- copy to the primary selection on mouse release
map("v", "<LeftRelease>", '"*y' , {silent = true, desc = "Copy selection to primary selection"})
```

## Paste primary selection on bspwm

```config
# %%hotkey: paste primary selection %%
ctrl + alt + ~button1
    xdotool click --delay 0 --clearmodifiers 2

# %%hotkey: paste primary selection using keyboard %%
shift + insert
    xdotool click --delay 0 --clearmodifiers 2
```
Github Timeline
Tags: javascript
Published: 2022-08-26 19:17:00

# Github-Timeline
![image](https://user-images.githubusercontent.com/55351251/187036070-86454833-9bf0-406c-865a-243cb7b8fcc5.png)

<span align="center">
 
![Follow](https://img.shields.io/github/followers/Semanteo.svg?style=social&label=Follow&maxAge=2592000)

</span>
<br>

## What is it ?

[Github Timeline](https://semanteo.is-a.dev/Github-Timeline/) is a website to see in a timeline the repos of **who ever you want !**

## How it works ?

1. Enter the username you want
2. Choose between the ascending or descending order
3. Click on **Generate !**

And it's finish ^^ 

## Features
### 26/08/2022
- [x] Sort by date | 26/08/2022
- [x] Show name, date and description
- [x] Use only the colors of Github Dark Theme
- [x] Link to the repos
- [x] Sort by ascending or descending

### 27/08/2022
- [x] Adding last update date, language, stars counter and if it's a fork
- [x] Adding Years and Months to the Timeline

### Future
- [ ] Implementation possible in READMEs

## Contributions

Be free to contribute and open prs or issues to improve the code !

If you want more infos on repos please open an issue !

[Github Repository](https://github.com/Semanteo/Github-Timeline/)
Event Loop
Tags: javascript, es6
Published: 2022-08-26 19:06:33

As we all know Java script is single threaded language. And It will never stop for anything. So when some function or code execute it will  goes to call stack. If the code is promise or call back then it will transfer towards webAPI stack ,else it will executed.

Now,What ever code is in webapi java script will check is that code is call back or promise if it promise it will store in MacroQueue or same as if is call back(setTimeout,Time Interval)then Java script store those in Micro queue.



Sample Code:

console.log("before execute");
  
function timer(sec) {
   let start = now = Date.now()
   while(now-start < (sec*1000)) {
     now = Date.now();
   }
}
  
timer(5);
  
// Executes after delay of 5 seconds
console.log("After execute");
Why Do We Need Version Control?
Tags: webdev, podcast, git
Published: 2022-08-26 19:05:30

{% spotify spotify:episode:6BW6S68hq6hNW484YFrnko %}

## What is HTML All The Things?

HTML All The Things is a [web development podcast](https://www.htmlallthethings.com/) and [discord community](https://discord.com/invite/jweMCx9) which was started by Matt and Mike, developers based in Ontario, Canada. 

The podcast speaks to web development topics as well as running a small business, self-employment and time management. You can join them for both their successes and their struggles as they try to manage expanding their Web Development business without stretching themselves too thin.

---





## What's This One About?

Welcome back to the HTML All The Things Podcast your web development, web design, and small business headquarters. This week, Matt and Mike discussed the importance of version control focusing on one of the most popular (if not most popular) version control systems, Git. The duo debated when to learn version control in your coding journey and discussed how difficult it is to learn in comparison to the coding language of your choice.

## Topics
* Why do we need version control?
* GIT workflows
* What can go wrong?
* Why were we not taught version control in school?


## Reference Tweet

{% twitter https://twitter.com/htmleverything/status/1561740982311604224 %}

## Thank you!

If you're enjoying the podcast consider giving us a review on [Apple Podcasts](https://podcasts.apple.com/us/podcast/html-all-things-web-development-web-design-small-business/id1412209136) or checking out our Patreon to get a shoutout on the podcast. 

**[Support us on Patreon](https://www.patreon.com/htmlallthethings)**


You can find us on all the podcast platforms out there as well as

[Instagram (@htmlallthethings)](https://www.instagram.com/htmlallthethings/)
[Twitter (@htmleverything)](https://twitter.com/htmleverything)
[TikTok](Html All The Things)
Duplicating Table Structure and Data with PostgreSQL
Tags: postgres, beginners, programming, webdev
Published: 2022-08-26 19:02:42

A handy little feature I recently learned about is super simple to work with. Use this to copy the structure of a table:
```sql
CREATE TABLE table2 ( LIKE table1 INCLUDING DEFAULTS INCLUDING CONSTRAINTS INCLUDING INDEXES );
```

Then you can copy data into your new table at your liking with:

```sql
INSERT INTO table2 SELECT * FROM table LIMIT 100;
```

Happy programming!
Today I've learned...
Tags: css, java, html, codenewbie
Published: 2022-08-26 18:54:48

As a beginner in this industry everything is coming to me as fairly new information. I've worked on and with computers for the majority of my life, yet have never dove into the logistics and more complex side of things. I strive to change that and learn as much as I can. Not only to pursue a new career path but to expand my knowledge as much as possible. Just today I learned that there are three major coding languages being CSS, html, and JavaScript. Html handling the display of documents to be displayed. CSS describing the presentation of the document, and JavaScript handling the behavior of the webpage itself. With this information as a basis I feel I have a solid stepping stone to move on to more elaborate topics to learn.
Fluent UI Insights EP2: Styling
Tags: fluentui, react, webdev, css
Published: 2022-08-26 18:30:00

Fluent UI Insights is a series that describes the design and decisions behind the Fluent UI React. In the second episode, Fluent UI Engineers Shift and Miro explain issues related to styling UI controls by sharing the requirements and also describing problems with existing solutions.

In this video they cover: 
- CSS
- CSS specificity
- BEM, CSS, CSS-in-JS
- The current state of things
- What's coming next with CSS-in-JS

{% embed https://youtu.be/a8TFywbXBt0 %}

As always let us know what kind of content you want see from Fluent UI React by visiting us on:

- GitHub: https://github.com/microsoft/fluentui
- Docs: https://react.fluentui.dev
- Twitter: https://twitter.com/fluentui
[2022-08-22] AWS ML Weekly Updates
Tags: aws, machinelearning
Published: 2022-08-26 18:28:00


2022-08-22 업데이트 전달 드립니다.
관련 자료에 대해서 댓글로 이야기 해주셔도 좋습니다 !

---

### CodeWhisperer에게 코드 추천 받으면서 Python Serverless application 만드는 영상 공유
[Amazon CodeWhisperer](https://aws.amazon.com/codewhisperer/)는 머신러닝 기반의 코드 추천 서비스 인데요. 이번에 Python을 사용해서 AWS Lambda 코드 작성하는 영상이 공개 되었네요. 코드 추천 서비스를 활용하면 반복적으로 작성하는 코드를 빠르게 완성할 수 있을 것으로 기대하는데요. Github에서도 [Copilot](https://github.com/features/copilot)이라는 유사한 서비스를 제공하는데요. AWS 서비스 관련 코드는 CodeWhisperer가 더 좋은 추천을 해주지 않을까 기대합니다. 
- 영상 링크 [바로가기](https://www.youtube.com/watch?v=8vkHLnhIFGA&t=1s)
- Amazon CodeWhisperer [preview 신청하기](https://bit.ly/3oWmGmD)

---

### SageMaker 사용하여 Real-Time 머신러닝 모델 서빙 배포하고 엔드포인트 생성하기 튜토리얼 
SageMaker를 사용해서 손쉽게 모델을 배포하고 엔드포인트까지 생성하는 좋은 내용의 튜토리얼이 공유 되었네요. 간단하게 모델을 배포하고 엔드포인트까지 만드는 것이 매우 편리해 보이는데요. 추가적으로, 해당 엔드포인트에 모니터링 메트릭을 제공하고, 트래픽 변화에 따라서 Auto Scaling도 설정할 수 있네요. 이런 기능도 직접 구축한다면 인프라 작업도 간단하지 않은데요. 빠르게 모델 서빙을 시작하기 위해서는 위 튜토리얼의 방식도 매력적으로 생각 됩니다. 
- 튜토리얼 [바로가기](https://aws.amazon.com/getting-started/hands-on/machine-learning-tutorial-deploy-model-to-real-time-inference-endpoint/?sc_channel=sm&sc_campaign=Machine_Learning&sc_publisher=LINKEDIN&sc_geo=GLOBAL&sc_outcome=awareness&trk=machine_learning)

---

### AI Use Case Explorer 소개
다양한 도메인의 AI 사용 사례를 찾아 볼 수있는 사이트가 있네요. 사용 사례, 산업군, 회사타입, 지역등으로 검색 가능합니다. 현재까지 AI 분야별로 어떻게 사용되고 있는지 궁금하시다면 검색해보시면 좋을 것 같네요. 저도 제가 근무하는 IT서비스 회사 이외에 다른 분야를 검색해보니 흥미로운 사용 사례가 많네요 ! :D 
- AI Use Case Explorer [바로가기](https://aiexplorer.aws.amazon.com/)

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

[더 많은 AWS ML Weekly Updates 리스트](https://dev.to/yoon/aws-ml-weekly-updates-44nk)
when do we actually use useEffect in react apps?
Tags: react, javascript, pwa
Published: 2022-08-26 18:19:01

## Why we need useEffects
Before React version 16.8, if you wanted to run a code when state of you component changes, you needed to use **life cycles** of class components.

in fact, you had three options:

1. run a code when your component was **mounted** (added to the DOM)
2. run a code when your component was **updated**
3. run a code when your component was **unmounted** (removed from the DOM)

it was all good and you could do anything you wanted easily, but what if we can code much more cleaner and leaner? in this case, `useEffect` will come to help us.

`useEffect` has been built to help you define your component's life cycle in just one function; but it's not all of it. there are more scenarios you will need it.

## Run in just once
on of the very first usages of `useEffect`s is when you want to run a block of code just for the first time your component loads.
you can easily do it. you just have to leave it's dependencies empty, so the code runs and nothing changes to make `useEffect` run again.

## Run it again
if we specify some dependencies for `useEffect`, anytime they change, `useEffect` will run our codes again. it's very lean and easy to use.

## Clean up the mess
we can also use some **clean up** techniques (by using `return ()=>{}`) to clear our browser memory when our component is done or user closes browser tab.

## Optimize your memory consumption
in fact, it's not a new scenario. when we use clean up technique, we are optimizing our memory consumption.
we can create our components without using `useEffect` but anytime we run them, we are allocating new block of memory and it might be harmful in some situations.

## Last words
feel free to leave your opinion bellow in the comments section.
I will update this post anytime I find new usages for `useEffect`s. it can help so much.
thank you reading this post ❤️
Discussion and Comment of the Week - v16
Tags: bestofdev
Published: 2022-08-26 18:19:00

This weekly roundup highlights what we believe to be the most thoughtful and/or interesting discussion of the week. We're also be highlighting one particularly cool comment in each installment. 🙌

The DEV Community is particularly special because of the kind and thoughtful discussions happening between community members. As such, we want to encourage folks to participate in discussions and reward those who are initiating or taking part in conversations across the community. After all, a community is made possible by the people interacting inside it.

## Discussion of the Week

Props to @nombrekeff for crafting the excellent prompt "[How do you motivate yourself to work on personal projects? As a profesional developer](https://dev.to/nombrekeff/how-do-you-motivate-yourself-to-work-on-personal-projects-as-a-profesional-developer-gdm)":

{% embed https://dev.to/nombrekeff/how-do-you-motivate-yourself-to-work-on-personal-projects-as-a-profesional-developer-gdm %}

Keff's prompt is super relatable. We've all been there... you finish up your work day and wanna get going on that personal project but just feel drained of energy and can't muster the motivation to move forward.

I love a good prompt that elicits personal advice and guidance, and this prompt definitely fits the bill. There was lots of excellent advice around building up energy, focusing on the purpose behind the project, and lazering in on the benefits that finishing the project will bring.

If any readers have ideas for building up motivation, don't hesitate to chime into the thread! 

## Comment of the Week

Big up to @danwalsh for their response to @ioanat94's awesomely instructive article "[Do's and Don'ts of Creating Your Portfolio Website](https://dev.to/ioanat94/dos-and-donts-of-creating-your-portfolio-website-2h4p)":

{% embed https://dev.to/danwalsh/comment/215nm %}

Dan's point about **showing** your skills by demonstrating it through your portfolio site's design & accompanying body of work versus **telling** folks how proficient you are in A, B, & C with arbitrary completion rates is golden. As Dan points out, using completion rates really begs more questions than it provides answers. Rather than making someone feel confident that you are adept in a specific technology, instead it might suggest to them that you are an unclear communicator. Thanks Dan, that is really great advice for anyone working on their personal portfolio!

If others have thoughts on this topic, please hop into the thread and let us know!

## What are your picks?

There's loads of great discussions and comments floating about in this community. These are just a few we chose to highlight. 🙂

I urge you all to share your favorite comment and/or discussion of the past week below in the comments. And if you're up for it, give the author an @mention — it'll probably make 'em feel good. 💚