docker ps shows running containers, amd docker container ls lists available containers
docker ps
docker container ls
import React, {useEffect} from 'react' | |
import './index.css'; | |
import { TransformWrapper, TransformComponent } from "react-zoom-pan-pinch"; | |
import {todoList} from './constants/todo' | |
import {useState} from 'react' | |
import 'react-grid-layout/css/styles.css' | |
import 'react-resizable/css/styles.css' | |
import GridLayout from 'react-grid-layout'; | |
function App(props) { |
import { define } from 'remount' | |
import App from './App' | |
define({ 'x-application': App }) |
const path = require('path'); | |
const glob = require('glob'); | |
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin'); | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
const TerserPlugin = require('terser-webpack-plugin'); | |
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); | |
const CopyWebpackPlugin = require('copy-webpack-plugin'); | |
module.exports = (env, options) => { | |
const devMode = options.mode !== 'production'; |
module.exports = function (api) { | |
api.cache(true); | |
const presets = [ | |
'@babel/preset-env', | |
'@babel/preset-react', | |
] | |
const plugins = [ | |
] |
defmodule WorkshopWeb.HomeView do | |
use WorkshopWeb, :view | |
end |
defmodule WorkshopWeb.HomeController do | |
use WorkshopWeb, :controller | |
def index(conn, _params) do | |
render( | |
conn, | |
"index.html", | |
props: Jason.encode!(%{foo: "bar"}) | |
) | |
end |
defmodule WorkshopWeb.Router do | |
use WorkshopWeb, :router | |
pipeline :browser do | |
plug :accepts, ["html"] | |
plug :fetch_session | |
plug :fetch_live_flash | |
plug :put_root_layout, {WorkshopWeb.LayoutView, :root} | |
plug :protect_from_forgery | |
plug :put_secure_browser_headers |
# make sure to move your .pem file for SSH auth to ~/.ssh & chmod 0400 the file | |
chmod 0400 your-server-identity.pem | |
# open ~/.ssh/config with your favorite text editer and drop in the following plumbing (replace the IP/host of your server and username and point to the correct pem file) | |
Host my-server | |
HostName 54.157.228.255 | |
User your-user-name | |
IdentityFile ~/.ssh/your-server-identity.pem | |
IdentitiesOnly yes | |
sudo apt-get update -y && sudo apt-get upgrade -y | |
sudo apt install postgresql -y | |
sudo su postgres | |
psql -U postgres -c "CREATE ROLE ubuntu;" | |
psql -U postgres -c "ALTER ROLE ubuntu WITH LOGIN;" | |
psql -U postgres -c "ALTER USER ubuntu CREATEDB;" | |
psql -U postgres -c "ALTER USER ubuntu WITH PASSWORD 'ubuntu';" | |
exit |