pip3 install pipenv
pipenv shell
# ------------------------------------------------------------------------------ | |
# ---------------------------- general shortcuts-------------------------------- | |
# ------------------------------------------------------------------------------ | |
# -- easy reverse cd -- | |
alias .1='cd ..' | |
alias .2='cd ../../' | |
alias .3='cd ../../../' | |
alias .4='cd ../../../../' |
file_specification() { | |
FILE_NAME="$(basename "${entry}")" | |
DIR="$(dirname "${entry}")" | |
NAME="${FILE_NAME%.*}" | |
EXT="${FILE_NAME##*.}" | |
SIZE="$(du -sh "${entry}" | cut -f1)" | |
printf "%*s${GRE}%s${NCL}\n" $((indent+4)) '' "${entry}" | |
printf "%*s\tFile name:\t${YEL}%s${NCL}\n" $((indent+4)) '' "$FILE_NAME" | |
printf "%*s\tDirectory:\t${YEL}%s${NCL}\n" $((indent+4)) '' "$DIR" |
Heroku is an web application that makes deploying applications easy for a beginner.
Before you begin deploying, make sure to remove any console.log
's or debugger
's in any production code. You can search your entire project folder if you are using them anywhere.
You will set up Heroku to run on a production, not development, version of your application. When a Node.js application like yours is pushed up to Heroku, it is identified as a Node.js application because of the package.json
file. It runs npm install
automatically. Then, if there is a heroku-postbuild
script in the package.json
file, it will run that script. Afterwards, it will automatically run npm start
.
In the following phases, you will configure your application to work in production, not just in development, and configure the package.json
scripts for install
, heroku-postbuild
and start
scripts to install, build your React application, and start the Express production server.
const {lstatSync, readdirSync} = require('fs'); | |
const {basename, join, resolve} = require('path'); | |
const denyList = ['images']; | |
const isDirectory = (source) => lstatSync(source).isDirectory(); | |
const getDirectories = (source) => | |
readdirSync(source) | |
.map((name) => join(source, name)) | |
.filter(isDirectory); |
const fs=require('fs'); | |
let cat= require( 'child_process' ).execSync( 'cat *' ).toString( 'UTF-8' ) | |
fs.writeFile( 'output.md', cat, ( err ) => { | |
// In case of a error throw err. | |
if ( err ) throw err; | |
} ); |
## Selectors | |
**Universal Selector** * {} | |
**ID Selector** #id {} | |
**Class Selector**.class {} | |
**Type Selector**h1, h2 ,h3 {} | |
**Adjacent Sibling Selector**h1 + p {} | |
**Child Selector**ul > li {} | |
**General Sibling Selector** h1 ~ p {} | |
**Descendant Selector**p a {} |
===========================
===========================
Access the PostgreSQL server from psql with a specific user: psql -U [username]; |
Connect to a specific database:\c database_name; |
To quit the psql:\q |
List all databases in the PostgreSQL database server\l |
List all schemas:\dn |
List all stored procedures and functions:\df |
List all views:\dv |
Lists all tables in a current databas |
Shellscripts
Shell Aliases