Skip to content

Instantly share code, notes, and snippets.

View NateWeiler's full-sized avatar

Nathan Weiler NateWeiler

View GitHub Profile
@NateWeiler
NateWeiler / Nano Linux Command-Line Text Editor.md
Last active June 13, 2020 16:38
Nano is a Linux simple text-editor that's very user friendly. In this tutorial, we will show you how to install and use the Nano text editor . Nano will allow you to edit text files in your [Linux server](https://1gbits.com/linux-vps/ "Linux server") command line environment. There are more advanced editors such as vim and emacs for Linux OS, bu…

Nano, Linux Command-Line Text Editor

Nano, Linux Command-Line Text Editor Nano is a Linux simple text-editor that's very user friendly. In this tutorial, we will show you how to install and use the Nano text editor . Nano will allow you to edit text files in your Linux server command line environment. There are more advanced editors such as vim and emacs for Linux OS, but Nano is straightforward and easy to use, which is why it's one of the most popular text editors for Unix systems.

Installing the Nano Text Editor

To install Nano On Debian / Ubuntu distributions use the following command: sudo apt-get install nano Install Nano on CentOS / RHEL using following command: yum install nano

Running Nano

Overview of nano's shortcuts

The editor's keystrokes and their functions

File handling

| Ctrl+S | Save current file

| Ctrl+O | Offer to write file ("Save as")

@NateWeiler
NateWeiler / download_gists.js
Created June 13, 2020 17:17
Gist to download all your gists
let request = require('request')
, path = require('path')
, fs = require('fs')
, url = "https://api.github.com/users/thomastraum/gists"
, savepath = './gists';
request(url, function (error, response, body) {
if (!error && response.statusCode == 200) {
@NateWeiler
NateWeiler / GNU Nano.md
Last active June 13, 2020 17:42
Here are some tips on how to install the latest version and how to use this editor.

GNU nano

GNU nano is a small and friendly text editor. Besides basic text editing, nano offers many extra features like an interactive search and replace, go to line and column number, auto-indentation, feature toggles, internationalization support, and filename tab completion. This is my favorite console text editor. Gnu Nano Editor

Here are some tips on how to install the latest version and how to use this editor.

Latest version

@NateWeiler
NateWeiler / Install Docker and Docker Compose within WSL.md
Created June 15, 2020 23:16
Ubuntu 18.04 installation notes taken from Docker's documentation

Install Docker and Docker Compose within WSL

We still need to install Docker and Docker Compose inside of WSL because it'll give us access to both CLI apps. We just won't bother starting the Docker daemon.

The following instructions are for Ubuntu 18.04, but if you happen to use a different WSL distribution, you can follow Docker's installation guide for your distro from Docker's installation docs.

Install Docker

You can copy / paste all of the commands below into your WSL terminal.

@NateWeiler
NateWeiler / Linux: tar Extract Files.md
Created June 16, 2020 01:42
You need to use the tar command to extract files from an archive or to create an archive (also known as tarball). A tarball or an archive is nothing but a single file that contains various individual files. It also includes information which allows your to restore files to their original form by one or more extraction programs such as tar command.

Linux: tar Extract Files

How can I extract or uncompress a file from tar ball downloaded from the Internet under Linux using bash command prompt?

You need to use the tar command to extract files from an archive or to create an archive (also known as tarball). A tarball or an archive is nothing but a single file that contains various individual files. It also includes information which allows your to restore files to their original form by one or more extraction programs such as tar command.

Extract or Unpack a TarBall File

@NateWeiler
NateWeiler / Mastering Markdown.md
Created June 16, 2020 06:22
Markdown is a lightweight and easy-to-use syntax for styling all forms of writing on the GitHub platform.

Mastering Markdown

  Download PDF version

Markdown is a lightweight and easy-to-use syntax for styling all forms of writing on the GitHub platform.

What you will learn:

  • How the Markdown format makes styled collaborative editing easy
@NateWeiler
NateWeiler / Understanding the GitHub flow.md
Created June 16, 2020 06:28
GitHub flow is a lightweight, branch-based workflow that supports teams and projects where deployments are made regularly. This guide explains how and why GitHub flow works.

Understanding the GitHub flow

 Download PDF version

GitHub flow is a lightweight, branch-based workflow that supports teams and projects where deployments are made regularly. This guide explains how and why GitHub flow works.

Create a branch

When you're working on a project, you're going to have a bunch of different features or ideas in progress at any given time -- some of which are ready to go, and others which are not. Branching exists to help you manage this workflow.

@NateWeiler
NateWeiler / Windows Package Manager Preview.md
Created June 16, 2020 08:11
If you're already familiar with what a package manager is, feel free to skip this paragraph. If you're still reading, you're going to love this! A package manager is designed to help you save time and frustration. Essentially, it is a set of software tools that help you automate the process of getting software on your machine. You specify which …

Windows Package Manager Preview

If you're already familiar with what a package manager is, feel free to skip this paragraph. If you're still reading, you're going to love this! A package manager is designed to help you save time and frustration. Essentially, it is a set of software tools that help you automate the process of getting software on your machine. You specify which apps you want installed, and it does the work of finding the latest version (or the exact one you specified) and installing it on your machine.

Just about every developer has wanted a native package manager in Windows. That day is finally here. You are going to be able to winget install your way to bliss. One of the best parts is that it is open source. I had to pinch myself when I was able to winget install terminal, and then winget install powershell, and then winget install powertoys. You get the idea, and If you do not see an app you use, just create a new manifest, and submit a pull request.

@NateWeiler
NateWeiler / Basic module usage.md
Created June 17, 2020 04:53
The basic Psycopg usage is common to all the database adapters implementing the DB API 2.0 protocol. Here is an interactive session showing some of the basic commands

Basic module usage

The basic Psycopg usage is common to all the database adapters implementing the DB API 2.0 protocol. Here is an interactive session showing some of the basic commands:

import psycopg2

Connect to an existing database

conn = psycopg2.connect("dbname=test user=postgres")