teleren/devto huggingface dataset:
Forgot my Root password
Tags: linux
Published: 2019-06-27 08:08:47

---
title: Forgot my Root password
published: True
description: get around the root password and change it
tags: Linux
---
<b><u>MEEEEEEEEEN WHAT WAS THE ROOT PASSWORD</u></b>

Today we are going to play around with our Linux box

<b>NOTE:This article can be used for malicious activity
I hereby take no responsibility for how you will utilize 
the following</b>

<b>Forgot your Linux root password? well lets get around it</b>

<u>Run Levels in Linux</u>
A run level in Linux is what determines what programs will run 
or will be executed at system startup
This is what determines whether your system loads a GUI or the 
CLI mode when booting


There are 7 run levels staring from 0-6
Each runlevel has some services started or stopped and this is normally what determines the default behavior of the machine
I will not get into much details concerning this levels, if you want a more detailed explanation leave a comment.
The runlevels are
runlevel 0 - system halt
runlevel 1 - single mode
runlevel 2 - multiple user mode without network file system
runlevel 3 - multiple user mode under CLI mode
runlevel 4 - This is left blank thus it can defined by the user
runlevel 5 - multiple user mode under graphical user interface(default on most desktops
runlevel 6 - reboot


The two used modes by default are the runlevel 3 and the runlevel 5
if you want to find out which runlevel you are on ,on the terminal type
 $runlevel
 The scripts driving this levels are located in the /etc directory
 

 <b><u>THE MEAT OF THIS ARTICLE</u></b>
  our primary focus is the runlevel 1(single user mode)
  This can be compared to what the folks at windows call safe mode
  in this mode networking services will not be started but it allows one to make changes to the system

<b>NOTE:This will only work if the systems' grub menu is not password protected</b>

lets do this folks: 
step 1: Reboot your machine and on the grub menu hit 'e' to enter the edit mode.
step 2: Find the line that starts with Linux and scroll to the end of that line
step 3: Delete the characters all the way to 'ro'
		-The ro stands for read only ,change this to 'rw' to allow writing
		-After replacing ro with rw hit space and add init=/bin/bash
		your line looks like this
			rw init=/bin/bash
step 4: Hit Ctrl-x or f10 to boot with current settings

The boot now gives you a shell with root privileges and you can go ahead and change the root password the usual way.

$passwd root

After confirming the password, reboot and there we have it , a new root password.
cryptocurrency exchange development services
Tags: cryptocurrency, blockchain
Published: 2019-06-27 07:56:27

The array of Oodles cryptocurrency exchange development services encompasses various exchange business area like cryptocurrency exchange solution, decentralized exchanges, and asset exchange platform. We are a leading cryptocurrency exchange development company in India. We provide cryptocurrency exchange software solutions that meet the secific requirements of investors and enable them with global exchange platform adoption. 

Visit: https://blockchain.oodles.io/cryptocurrency-exchange-development/
How to crawl website using #bash script?
Tags: bash, linux, github
Published: 2019-06-27 07:46:29

Bash script is one of the amazing scripting language used to automate tasks in Linux & Unix and it is one of my favourite scripting language for automating the tasks.

A few days ago I was searching about how to crawl website page?
After founding lot of stuff in the internet I learnt about 'Wget' tool into linux system. 

Wget is a useful for downloading and crawling a website page.
![](https://thepracticaldev.s3.amazonaws.com/i/qt5h83jewi96x67k5j4w.png)

So after this I started writing a bash script for website page crawling.
-> Firstly open up my favourite vim editor
  ![](https://thepracticaldev.s3.amazonaws.com/i/ka4vud9otwq6e4qrk494.png)

-> Then started writing script with case statement
  ![](https://thepracticaldev.s3.amazonaws.com/i/z4bcm7ams8d9mdfuzy34.jpg)

->As you can see I uses case statements and automated wget tool into a simple bash script and it its a working code..

For more details about bash and automation
visit my github account
[bash-script]:https://github.com/ankitdobhal
Machine info at a glance with rainmeter
Tags: showdev, design
Published: 2019-06-27 07:14:42

---
title: Machine info at a glance with rainmeter
published: true
description: Style your desktop with rainmeter
tags: showdev, design
cover_image: https://thepracticaldev.s3.amazonaws.com/i/plzvuey0aop9fhht9ejr.png
---

# What is Rainmeter? 

Rainmeter is an application for windows that allows you to add a layer to your desktop with any information you want. You can add application launchers and install predefined userskins. There's a decent community which provides new skins  all the time. 

# What does it look like?

The way you want. I designed it to show information about my workstation.

![](https://thepracticaldev.s3.amazonaws.com/i/plzvuey0aop9fhht9ejr.png)

Especially when I'm running a local test environment or compiling things I like to have all the information about my work machine at a glance without popping around the taskmanager and stuff. Rainmeter is highly customizable and quite well performing (as you can see in the screenshot)

To get more information and skins, take a look at
- [the homepage](https://www.rainmeter.net/)
- [devian art for skins](https://www.deviantart.com/rainmeter/gallery/23941137/Skins)
- [the subreddit where users present their builds](https://www.reddit.com/r/Rainmeter/)
How do you keep up to date during leaves of absence?
Tags: discuss, webdev
Published: 2019-06-27 06:47:35

---
title: How do you keep up to date during leaves of absence?
published: true
description: I'm not working for 6 months. How can I stay up to date with relevant technologies?
tags: #discuss, #webdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/99d44kc6affot03hk4me.jpg
---

Last August, we got our first child - Jens Ferdinand - and he's been an absolute delight. Becoming a parent has been an amazing experience, with tons of laughter, smiling and crying. And poop, of course.

I live in Norway, a country that provides 48 paid weeks of parental leave to split between the two parents. We thought we'd be a bit progressive and split that time evenly between us - so that we both got to know our little rascal a bit better, and so we could evenly split the workload that comes with it.

Because of this, I've been a stay-at-home dad for about 6 months now, and I'm finding it challenging to keep my technical skills up to par. I think this will probably resonate with anyone having an extended leave of absence from their career - for whatever reason (illness, burnout, parental leave, unemployment, you name it).

I still do a few things to keep up to date though:

- I read a lot of articles, as well as threads on Twitter and Reddit
- I write articles on stuff I find interesting
- I play with implementing designs and app ideas (even though they might never be completed)
- I make sure to stay active in our company's Slack
- I'm making workshops and coaching colleagues remotely to do the same

These are working out well for me, but I'd love to hear what you've done (or are doing)! What are you doing to stay up to date with your technologies of choice?
All About Overloading C# Constructors
Tags: csharp, tutorial, beginners
Published: 2019-06-27 06:34:38

---
title: All About Overloading C# Constructors
published: true
tags: csharp,tutorial,beginners
series: C# for Beginners
cover_image: https://wellsb.com/csharp/wp-content/uploads/sites/2/2019/04/beginners-overload-constructors-min.png
---

For a given class in C#, you may need different ways to pass arguments to it. You can do this by [overloading a constructor](https://wellsb.com/csharp/beginners/csharp-constructor-overload/). This technique enables you to initialize objects of the same class in different ways using a single class definition.

For example, suppose you want the ability to pass in different numbers of initial parameters.  Using overloaded constructors allows you to do that by defining valid states for your class and even setting initial values for the properties of your class object at the moment of instantiation. 

In this tutorial, you will learn about constructor overloading by working through an example. Click through to the source for the details.

[Source](https://wellsb.com/csharp/beginners/csharp-constructor-overload/)
4.11 LAB: Remove gray from RGB Zybooks problem solved
Tags: replit, python
Published: 2019-06-27 04:59:12

Summary: Given integer values for red, green, and blue, subtract the gray from each value.

Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray).

Given values for red, green, and blue, remove the gray part.

Ex: If the input is:

130
50
130
the output is:

80 0 80
Find the smallest value, and then subtract it from all three values, thus removing the gray.

Note: This page converts rgb values into colors.



{% replit @AbishekLakandri/Solved-411-LAB-Remove-gray-from-RGB %}
#PureCSS - Responsive Iron Man Arc Reactor
Tags: codepen, css, purecss
Published: 2019-06-27 04:02:02

---
title: #PureCSS - Responsive Iron Man Arc Reactor
published: true
tags: codepen, css, purecss
---

<p>Responsive Iron Man Arc Reactor using CSS</p>

{% codepen https://codepen.io/AsyrafHussin/pen/odVpmE %}
How to build .Net Core on FreeBSD (UPDATED AGAIN?)
Tags: csharp, dotnet, freebsd
Published: 2019-06-27 03:58:28

Sorry! These are not the Core you are looking for...

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

This article previously had the instructions for the 2.x .Net Core which has officially been replaced by 5 preview 3. 

The most recent version of .Net Core on FreeBSD can be found [here](https://github.com/jasonpugsley/installer/wiki/.NET-5.0-Preview-3-for-FreeBSD)
gowebexamples ภาษาไทย
Tags: go, website, ไทย
Published: 2019-06-27 03:31:31

---
title: gowebexamples ภาษาไทย
published: true
description: gowebexamples ภาษาไทย forked จาก gowebexamples มาให้เพื่อนๆได้อ่านกันในภาษาที่เราคุ้นเคย
tags: go, website, ไทย
cover_image: https://thepracticaldev.s3.amazonaws.com/i/hoaaehvuxaut2hpcalv2.jpg
---

Golang ได้ครับความนิยมากขึ้นในทุกชั่ววินาที เมื่อก่อนผมก็หาเวลาว่างในการศึกษาเพิ่มเติมเหมือนกัน แม้ตอนนี้จะแผ่วๆ ไปบ้าง (\^_\^)

แต่ตอนที่ได้ทำการศึกษาภาษา Go อยู่นั้นก็ได้ไปเจอกับ [gowebexamples](https://github.com/gowebexamples/gowebexamples) ที่อยู่บน github เลยเอามาลองแปล เพื่อที่จะได้เป็นการศึกษาเรียนรู้ และน่าจะมีประโยนช์สำหรับคนอื่นด้วย ตอนนี้ก็ได้ทำการแปลเสร็จเป็นที่เรียบร้อยแล้วครับ เลยเอามาแปะเผื่อจะเป็นประโยชน์สำหรับคนที่กำลังสนใจที่จะเรียนรู้ภาษ Go ครับ

เข้าไปที่ [gowebexamples.urairat.com](https://gowebexamples.urairat.com/) ได้เลยครับ

เนื้อหาที่มี จะประกอบไปด้วย 


- [Hello World](https://gowebexamples.urairat.com/hello-world/)
- [HTTP เซิร์ฟเวอร์](https://gowebexamples.urairat.com/http-server/)
- [เร้าติ้ง (using gorilla/mux)](https://gowebexamples.urairat.com/routes-using-gorilla-mux/)
- [เทมเพลต](https://gowebexamples.urairat.com/templates/)
- [รีเควสต์และฟอร์ม](https://gowebexamples.urairat.com/forms/)
- [แอสเสทและไฟล์](https://gowebexamples.urairat.com/static-files/)
- [มิดเดิลแวร์ - ขั้นพื้นฐาน](https://gowebexamples.urairat.com/basic-middleware/)
- [มิดเดิลแวร์ - ขั้นสูง](https://gowebexamples.urairat.com/advanced-middleware/)
- [เซสชั่น](https://gowebexamples.urairat.com/sessions/)
- [เจสัน](https://gowebexamples.urairat.com/json/)
- [เว็บซ็อกเก็ต](https://gowebexamples.urairat.com/websockets/)
- [เข้ารหัสแบบแฮช (bcrypt)](https://gowebexamples.urairat.com/password-hashing/)

จากที่ผมได้ลองทำความเข้าใจและเปรียบเทียบกับบทความอื่นๆ gowebexamples อาจจะไม่ครอบคลุมเนื้อหาที่มีความ Advance หรือครอบคลุมกระบวนท่าทั้งหมดในการสร้างเว็บไซต์ แต่ก็ถือว่าเป็นจุดเร่ิมต้นที่ดีในการที่จะเรียนรู้ภาษา Go ผ่านโค้ดและการใช้งาน package พื้นฐานต่างๆ ที่มีในการสร้างเว็บไซต์ด้วยภาษา Go 

ความเห็นส่วนตัวของผมคือ มันเป็นบทเรียนที่เหมาะสำหรับผู้เริ่มต้นที่พอมีพื้นฐานด้าน programming อยู่บ้าง เนื่องด้วยความง่ายต่อการทำความเข้าใจของโค้ดตัวอย่างที่มีให้ และการอธิบายที่กระชับครับ
10 Articles related to Web Development YOU can't miss. | Reads for Web Developers
Tags: php, javascript, elasticsearch
Published: 2019-06-27 03:21:31

---
title: 10 Articles related to Web Development YOU can't miss. | Reads for Web Developers
published: true
description: 10 Articles related to Web Development YOU can't miss. | Reads for Web Developers
tags: PHP, Javascript, Elasticsearch
cover_image: https://thepracticaldev.s3.amazonaws.com/i/6i28dk95r5h0up3gyzph.png
---
<b>1) PHP Cookies and Sessions | Detailed Explanation | Coding Examples</b>

Link To The Article: <a href="https://fullstackgeek.blogspot.com/2019/06/php-cookies-and-sessions-examples.html">PHP Cookies and Sessions | Detailed Explanation | Coding Examples</a>



<b>2) Asynchronous JavaScript | Callbacks | Closures | Promises</b>

Link To The Article: <a href="https://fullstackgeek.blogspot.com/2019/02/asynchronous-javascript-explained-for-beginners.html">Asynchronous JavaScript | Callbacks | Closures | Promises</a>




<b>3) Best PHP Frameworks (2019)</b>

Link To The Article: <a href="https://fullstackgeek.blogspot.com/2019/05/best-php-frameworks.html">Best PHP Frameworks (2019)</a>



<b>4) Introduction to Elasticsearch and the ELK stack</b>

Link To The Article: <a href="https://fullstackgeek.blogspot.com/2019/03/introduction-to-elasticsearch-and-elk-stack.html">Introduction to Elasticsearch and the ELK stack</a>



<b>5) What should I learn after PHP | Roadmap 2019</b>

Link To The Article: <a href="https://fullstackgeek.blogspot.com/2019/05/what-should-i-learn-after-php.html">What should I learn after PHP | Roadmap 2019</a>



<b>6) Redis vs MySQL Benchmarks</b>

Link To The Article: <a href="https://fullstackgeek.blogspot.com/2019/04/redis-vs-mysql-benchmark.html">Redis vs MySQL Benchmarks</a>



<b>7) InnoDB vs MyISAM | Storage Engines | Tabular Differences</b>

Link To The Article: <a href="https://fullstackgeek.blogspot.com/2019/05/main-differences-between-innodb-and-myisam.html">InnoDB vs MyISAM | Storage Engines | Tabular Differences</a>



<b>8) Best PHP Books for Beginners [Updated] [2019]</b>

Link To The Article: <a href="https://fullstackgeek.blogspot.com/2019/06/best-php-books-for-beginners.html">Best PHP Books for Beginners [Updated] [2019]</a>



<b>9) Implementing OTP in PHP using Twilio</b>

Link To The Article: <a href="https://fullstackgeek.blogspot.com/2019/03/implement-otp-in-php-with-example.html">Implementing OTP in PHP using Twilio</a>



<b>10) Var vs Let in JavaScript</b>

Link To The Article: <a href="https://fullstackgeek.blogspot.com/2019/02/var-vs-let-javascript.html">Var vs Let in JavaScript</a>


Happy Learning,
Full Stack Geek
find 查询文件夹最近修改文件
Published: 2019-06-27 03:09:15

在排查一个程序可以输出的日志的时候，需要找到这个程序最新输出日志的文件是哪个

可以在初步的 lsof -p xxx -Pn 确定了程序所使用日志后，使用：

find xxx -type f -name '*.log' -printf '%T@ %p\n'|sort -n
得到日志目录下最新输出的日志文件
Hello World
Tags: firstpost
Published: 2019-06-27 02:24:26

My first post so this is the HelloWorld moment!

I've been a Developer for over 20 years... it's hard to say and even harder for me to believe. Not only am I getting old but when you launch your first website when your 15 that 20-year mark creeps up mighty quickly. 

I think I'm going to like it here. But in the meantime, you can find me at [gogorichie.com been there since 2002](http://www.gogorichie.com)
How "green" is your code?
Tags: discuss
Published: 2019-06-27 02:08:44

Hello guys. 

I often think about electricity consumption. Services and Servers running never stop (leaving aside on-demand instances, but they are also in servers).

From the moment a user navigates, lots of things happen: servers, internet providers, submarine cables, Satellites, GSM, electricity and more electricity.

How can we help our planet in our day to day work? Perhaps:
- **High efficiency algorithms:** If users have 16 gigs of RAM with a Quad core CPU it doesn't mean we can use all the  available resources
- **Light weight resources:** making users download heavy resources consumes more data and in consequence more battery
- **Configurable background services:** Why don't provide the user with settings to adjust how often he/she needs to update data?
- **Colors:** don't use colors that make users increase their screen brightness
- ...

Maybe I'm going too far, but do any of you think about this when you are writing code? Does this motivate you to write better code?
Is it possible to write energy efficient code?
Customise a new Phoenix app (Part 2 - Style)
Tags: elixir, phoenix, tailwindcss
Published: 2019-06-27 00:42:15

> TL;DR try [CustomPhx - GitHub](https://github.com/mutablestate/custom_phx) in a new Phoenix project to automate Tailwindcss installation and HTML generation.

In [Part 1](https://dev.to/mutablestate/customise-a-new-phoenix-app-part-1-outdated-packages-a1o) of this series we updated both `mix` and `NPM` dependencies in a new Phoenix project. Let's continue our customisations with some style! 

You generate a new Phoenix project. Do you continue building on top of the default styles? or *choose your own adventure*?

### Phoenix Default

Since Phoenix 1.4, all new projects include the minimal CSS framework [Milligram](https://milligram.io/) in `assets/phoenix.css`. This provides `classless` markup for any HTML generated with [mix phx.gen.html](https://hexdocs.pm/phoenix/Mix.Tasks.Phx.Gen.Html.html).


### Style with Milligram

You chose Milligram! 

You have sensible defaults and can use the generators to get up and running quickly.

To theme your project write custom classes and add them to your markup. Check out [Awesome Milligram](https://github.com/milligram/awesome-milligram) for additional resources.


### Style with something else

You chose to replace Milligram! 

You have options. Lots of options. Start with this categorised list [Awesome CSS Frameworks](https://github.com/troxler/awesome-css-frameworks). 

Installation instructions are specific to each framework but if it comes with a pre-processor (LESS, SCSS, SASS, PostCSS) you'll need to install a `loader` to `package.json` and configure it in `webpack.config.js`. See  [Webpack Loaders - Styling](https://webpack.js.org/loaders/#styling).

Unfortunately, the Phoenix HTML generated files will look unstyled and may require significant markup changes and additional classes to look good in a new framework. Alternatively you can [Customise your Phoenix HTML Generator](https://dev.to/mutablestate/customise-your-phoenix-html-generator-2l85).


### Style with Tailwindcss

I chose [Tailwindcss](https://tailwindcss.com/#what-is-tailwind)! 

This utility-first framework recently matured into a `1.0` release and has quite a buzz around it (fully justified IMO).

For a basic install see the excellent [Using Tailwind with Phoenix](https://www.derrickreimer.com/tech/2019/06/12/tailwind-phoenix.html) guide.

For a more comprehensive approach i've created a mix archive to automate installation with a custom HTML generator [CustomPhx - GitHub](https://github.com/mutablestate/custom_phx). Give it a try!

*Generated form field markup* 
```elixir
<%= label class: "block mb-6" do %>
  <span class="form-label block">name</span>
  <%= text_input f, :name, class: "form-input w-full mt-1" %>
<% end %>
<%= error_tag f, :name %>
```

*Generated form*
![](https://thepracticaldev.s3.amazonaws.com/i/htmghusaih16gww7rcd4.png)
DevDiscuss Resume Stats
Tags: devdiscuss, resume, career, discuss
Published: 2019-06-27 00:39:02

---
title: DevDiscuss Resume Stats
published: true
description: Quick analysis of the many users that responded with what they use for their resume.
tags: devDiscuss, resume, career, discuss
---

During #DevDiscuss last night, we discussed resumes! I posed this question, which received more attention than expected:

{% twitter 1143687342445793280 %}

So being the math-minded person that I am, I started to wonder what the responses would look like in a Pie chart (OK, maybe I also wanted a reason to play with Affinity Designer). 

![Pie Chart showing the statistics: 22% Latex, 10% Google Drive, 9% HTML & CSS, 8% Word/Pages, 6% Canva, 5% Indesign, 5% LinkedIn, 3% Markdown, and 28% Other ](https://thepracticaldev.s3.amazonaws.com/i/pfp1a5qa92vfnd41v1mr.png)

My quick notes about the data: 
- At the time of review, I pulled 207 responses indicating a resume creation tool of choice. 
- Latex was a VERY popular response. I suspect this is higher within the developer community than outside it. 
- Personally, I never would have thought to use tools like Illustrator/Canva, but many others have! I loved the variety of responses received - There are so many interesting tools out there for resume generation.

**What do you use for your resume?** Feel free to join in here, or on Twitter!
Detecting invalid dates in JavaScript
Tags: javascript, dates, isnan
Published: 2019-07-01 21:37:00

---
title: Detecting invalid dates in JavaScript
published: true
tags: javascript, dates, isNan
canonical_url: https://george.mand.is/2019/06/detecting-invalid-dates-in-javascript/
---

When you want to instantiate a new instance of a JavaScript date object you can pass along date information as a string like this:

```
new Date('June 27, 2019')

```

In fact, it's somewhat forgiving in accepting a variety of date formats. All of these in Chrome 75 as of this writing are valid ways to create a date object:

```
new Date('June 27, 2019')
new Date('2019, June 27')
new Date('2019/06/27')
new Date('6/27/19')
new Date('6-27-19')
new Date('6/27/2019')
new Date('6-27-19')
new Date('2019-06-27')
new Date('6/27/19 11:00')
new Date('2019-06-27')

```

For production I wouldn't suggest doing this. I'd suggest leaning on an established library like [Moment.js](https://momentjs.com/) or one of the many smaller alternatives suggested in [this GitHub repository](https://github.com/you-dont-need/You-Dont-Need-Momentjs "You Don't Need Moment.js"). But if you're just experimenting with something and need a quick-and-dirty solution to creating a date object, knowing you can do this is handy.

It's also handy to know if you've accidentally created an invalid date. Looking at the output in the console, this seemed like this should be easy:

```
new Date('My Birthday')
// Invalid Date

```

You might expect to be able to do something like this:

```
const birthday = new Date('My Birthday')

if (birthday === "Invalid Date") { ... }

```

But you would be mistaken! While it's generally considered a best practice to test for strict equality and use that triple equals sign, it's not helping you here. The value spit out to the console isn't actually a string, strange as that might seem.

Technically, this will work:

```
if (birthday == "Invalid Date") { ... }

```

But I don't fully trust it and am not sure about support in older browsers.

What's helpful to remember is that the date object is just a number, provided it's formatted right:

```
const day1 = new Date('June 27, 2019')
const day2 = new Date('My Birthday')

console.log(day1.valueOf())
// 1561618800000 

console.log(day2.valueOf())
// NaN

```

That means we can use the delightfully bizarre [isNaN()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN) function to figure out if our date is formatted correctly or not:

```
if (isNaN(birthday)) { ... }

```

Voilà.

If you're new to all of this JavaScript/Date/NaN chicanery, I'll leave you with this to copy-and-paste into your console:

```
typeof NaN

```