x
-
+
Binary Powers
<
o
>
2 0
=
1
2 1
=
2
2 2
=
4
2 3
=
8
2 4
=
16
2 5
=
32
2 6
=
64
2 7
=
128
2 8
=
256
2 9
=
512
2 10
=
1024
2 11
=
2048
2 12
=
4096
2 13
=
8192
2 14
=
16384
2 15
=
32768
2 16
=
65536
2 17
=
131072
2 18
=
262144
2 19
=
524288
2 20
=
1048576
x
-
+
Linux "find" Command
<
o
>
find
<dir>
[-not] -name
<regex>
 . . .
 . . .
-type
<d,f,...>
 . . .
 . . .
-mtime
<+/-><integer>
 . . .
 . . .
-maxdepth
<integer>
 . . .
 . . .
-mindepth
<integer>
 . . .
 . . .
 . . .
 . . .
-exec <command> {} \;
x
-
+
Computer Links
<
o
>
x
-
+
VI Quick Navigation
<
o
>
"/"<string> ENTER
search
"/\c"<string> ENTER
search (case insensitive)
"?"<string> ENTER
search (backward)
"n"
next match in search
"N"
previous match in search
<integer>"G"
move cursor to <integer> line
"G"
move cursor to last line
"z" ENTER
move cursor line to top of screen
"|"
move cursor to first column
<integer>"|"
move cursor to <integer> column
"$"
move cursor to last column
<integer>"$"
move cursor to last column <integer> lines down
CONTROL "f"
move forward one full screen
CONTROL "b"
move backward one full screen
"w"
move to next word
"b"
move to beginning of word
<integer> ENTER
move <integer> lines down
")"
move a sentence forward
"("
move a sentence back
"}"
move a paragraph forward
"{"
move a paragraph back
x
-
+
JavaScript
<
o
>
<script src="myScript.js"></script>
debugger;
console.log(   );
clear(   );
localStorage.clear(   );
document.getElementsById( 'name' );
document.getElementsByClassName( 'name' );
document.getElementsByTagName( 'name' );
document.getElementsByName( 'name ');
preventDefault(   );
document.styleSheets[9].rules[9] || document.styleSheets[9].cssRules[9]
document.styleSheets[9].cssRules[9].style.backgroundImage
"text-align: center;" ... "display: inline-block;"
querySelector( body #id );
querySelectorAll( body .class );
JSON.stringify(   ) turns a Javascript object into JSON text and stores that JSON text in a string
JSON.parse(   ) turns a string of JSON text into a Javascript object.
null != element.match(   )
string = element.replace(   )
element.style.zIndex = 9
window (global), var (local fn) and let (local block)
getElementByID(   ) can only be used on "document"
basically there are two event models in JavaScript...event capturing and event bubbling
element.classList.contains( 'class name to search' );
if( document.querySelector( '.mydivclass' ) !== null ){ // .. it exists }

chrome://about
chrome://settings/content/cookies
chrome://chrome/settings/clearBrowserData
file:///
x
-
+
WikipediA
<
o
>
x
-
+
Musicians
<
o
>
x
-
+
Audio Clips
<
o
>
x
-
+
Apache2 Server
<
o
>
x
-
+
Hangman (elements)
<
o
>


Wrong Letters:


x
-
+
Linux Command Line
<
o
>
x
-
+
Colors
<
o
>
x
-
+
SQL Joins
<
o
>
x
-
+
Informix
<
o
>
Informix History

x
-
+
Web Utilities
<
o
>
x
-
+
About AOS
<
o
>
x
-
+
Interest Calculator
<
o
>
Principle
Interest
Year(s)
Δ Principle

x
-
+
"Quotes"
<
o
>
x
-
+
Hall of Fame
<
o
>
x
-
+
Sandbox
<
o
>
|PANES | | |PANES /^\ |PANES | |~~~| | | |^^^^^^^| / \ /^\ |[]+ | |~~~| |^^^^^^^| | +[]| | | | +[]|/\/\/\/\^/\/\/\/\|^^^^^^^| |+[]+ |~~~~~~~~~~~~~~~~~| +[]| | | [] /^\ [] |+[]+ | | +[]+| [] || || [] | +[]+| |[]+ | || || |[]+ | |_______|-----------------|_______|

Build a sand castle...
or two!

x
-
+
Playground
<
o
>
__________ __ ___ \______ \ | _____ ___ __ ___________ ___ __ __ ____ __| _/ | ___/ | \__ \\ | |/ __ \ __ \ / __\| | \/ \ / __ | | | | |__/ __ \\___ / /_/ \ | \_\ /_/ | | / | \/ /_/ | |____| |____(____ / ____\___ /|__| \___/|____/|___| /\____ | \/\/ /_____/ \/ \/

  Run around!

x
-
+
Garage
<
o
>
x
-
+
SSH connection attempts
<
o
>
1. Filter for interactive SSH logins
   bash> grep sshd.\*Failed /var/log/auth.log | less

2. Filter for failed connections (i.e. no login attempted, could be a port scanner, etc)
   bash> grep sshd.\*Did /var/log/auth.log | less
x
-
+
Class Outline - 2018/02/20
<
o
>
  1. Terminal
    • Basics...
      • simple commands...hostname, whoami, pwd, ls...
      • less overhead
      • super flexible...can do everything!
      • great tools
      • automation
      • VI
    • SSH to webserver
      • file structure dev, run and production
      • Files...panes*, hangman*, etc
      • reversi
  2. Browser
    • mulitiple tabs
      • great for testing...don't refresh
    • incognito window
      • fooled me with localStorage
    • refresh
      • get programming change into memory
      • page is really messed up
    • Inspect/JavaScript console
      • find elements in pages
      • localStorage
      • view CSS
      • type in console
  3. Page "find" layout and functionality
    • issue with highlight inside panes
  4. To Do List
    • explain what I ran into making this pane
x
-
+
Agent Jinxes
<
o
>
Password:
x
-
+
Places to Visit
<
o
>
x
-
+
Three Sysadmin Rules...
<
o
>
x
-
+
Island Albums (K^2)
<
o
>
x
-
+
Travel - NYC...Planning!
<
o
>
x
-
+
Agent Questions
<
o
>
Password:
x
-
+
Companies (Dream)
<
o
>
x
-
+
Interview Questions
<
o
>
x
-
+
Island Albums (Pumpkin)
<
o
>
x
-
+
Idioms
<
o
>
x
-
+
Agent Emojis (ASCII)
<
o
>
x
-
+
IKBB
<
o
>
Password:
x
-
+
Travel - NYC...Visit!
<
o
>
x
-
+
Travel Games
<
o
>
x
-
+
PostgreSQL
<
o
>
psql
  • Client config file
    • ${HOME}/.psqlrc
    • \set PROMPT1 '%[%033[1;37m%]%M:%> %n@%/%R%#%x%[%033[0m%] '
    • \set PROMPT2 ''
    • \pset null '(NULL)'
    • \set user 'SELECT current_user;'
    • \echo 'Message here!\n'

  • Connect
    • psql -U postgres [-d databaseName]
    • \c databaseName

  • List version
    • SELECT version( );

  • Help
    • \?
    • \? [commands]
    • \? [options]
    • \? [variables]
    • \h [NAME]

  • Pager...uses environment's "PAGER" variable
    • \pset pager off
    • \pset pager on

  • Editor...uses environment's "EDITOR" variable
    • ctrl-alt-j
    • \e

  • Set variables
    • \set version 'SELECT version( );'
    • \set user 'SELECT current_user;
    • \set extensions 'select * from pg_available_extensions;'
    • \set nopager '\\pset pager off'
    • \set pager '\\pset pager on'
    • \set ls '\\echo `ls`'
    • \set ECHO_HIDDEN
    • \unset ECHO_HIDDEN

  • Set user
    • ctrl-alt-j
    • \e

  • List databases
    • \l
    • \l+
    • SELECT datname FROM pg_database;

  • List tables
    • \dt
    • \dt+
    • \d <table>
    • \d+ <table>
    • SELECT
        *
      FROM
        pg_catalog.pg_tables
      WHERE
        schemaname != 'pg_catalog'
        AND
        schemaname != 'information_schema';

  • List schemas (namespace)
    • \dn
    • SELECT * from pg_catalog.pg_namespace;
    • SELECT current_schema;
    • \dn+
    • SELECT
        n.nspname AS "Name",
        pg_catalog.pg_get_userbyid(n.nspowner) AS "Owner",
        pg_catalog.array_to_string(n.nspacl, E'\n') AS "Access privileges",
        pg_catalog.obj_description(n.oid, 'pg_namespace') AS "Description"
      FROM
        pg_catalog.pg_namespace n
      WHERE
        n.nspname !~ '^pg_'
        AND
        n.nspname <> 'information_schema'
      ORDER BY 1;

  • List objects
    • \d <schema>.<tab><tab>
    • \dtvs *   --tables/views/sequences
    • \dtvs <schema>.*   --tables/views/sequences
    • \d <schema>.*

  • List users (roles)
    • \du
    • \du+
    • select * from pg_user;
    • select CURRENT_USER;

  • Create database
    • CREATE DATABASE databaseName;

  • Create table
    • CREATE TABLE tableName
      (
        
      id  serial not null primary key,
        
      dtCreated  timestamp not null,
        
      dtUpdated  timestamp,
        
      data  jsonb
      );

  • List object (table, view, sequence, or index) definition
    • \d object

  • List object (table, view, sequence, or index) access privileges
    • \dp object
    • \z object

  • Grants
    • GRANT USAGE ON SCHEMA schema TO userName;
    • GRANT SELECT, INSERT, UPDATE ON tableName TO userName;
    • GRANT SELECT, UPDATE ON SEQUENCE tableName_id_seq TO userName;

  • Select
    • SELECT columns FROM tableName;
    • SELECT columns FROM tableName WHERE expression;
    • SELECT columns FROM tableName WHERE expression LIMIT integer OFFSET integer;

  • Repeat query
    • \watch seconds

  • Set timmer
    • \timer

  • Insert
    • INSERT INTO tableName( dtcreated, data ) VALUES( now(), '{}' );

  • Export table to CSV file
    • COPY tableName TO 'path/fileName.csv' CSV;

  • Delete record(s)
    • DELETE FROM tableName WHERE id >= 1000000;

  • Truncate table
    • TRUNCATE tableName;

  • Import table from CSV file
    • COPY tableName FROM 'path/fileName.csv' WITH( FORMAT CSV );

  • Alter sequence
    • ALTER SEQUENCE tableName_id_seq RESTART WITH 1;

  • Drop table
    • DROP TABLE tableName;

  • Active connections (w/query)
    • SELECT
        pid
        ,datname
        ,usename
        ,application_name
        ,client_hostname
        ,client_port
        ,backend_start
        ,query_start
        ,query
        ,state
      FROM
        pg_stat_activity
      WHERE
        state = 'active';

pg_dump
  • Dump database
    • pg_dump databaseName
    • pg_dump --create databaseName
    • pg_dump --create --schema-only databaseName

  • Dump table
    • pg_dump --schema-only --table=tableName databaseName
    • pg_dump -st tableName databaseName
x
-
+
ID Generator
<
o
>
Length
Characters


 
x
-
+
Travel Map
<
o
>
x
-
+
Interesting Words
<
o
>
x
-
+
Open Reversi
<
o
>
x
-
+
Notes (ASCII)
<
o
>
x
-
+
Agent Vocab
<
o
>
x
-
+
What School Didn't Teach
<
o
>
x
-
+
Samsung Gear S3 Frontier (info)
<
o
>
x
-
+
OcciSpace
<
o
>
x
-
+
Recipes (food)
<
o
>
x
-
+
Samsung Gear S3 Frontier (faces)
<
o
>
x
-
+
Chicken or the Egg
<
o
>
x
-
+
My foxtrot
<
o
>
x
-
+
Fun Words to Swipe!
<
o
>

Here is my list!
In order of my discovery:
x
-
+
Astrological Signs
<
o
>
x
-
+
Time Share Game
<
o
>

Share fun times by texting with a friend(s)...
letting them know you are thinking of them.
Don't force...let it happen naturally.
Military time ups the game!
It is really cool to share a time that matches
two categories.

In order of favorites:

Matches two categories:
etc
x
-
+
The Friday Five
<
o
>
x
-
+
Song Duets
<
o
>
x
-
+
~Pages~
<
o
>
x
-
+
Lamborghini
<
o
>
x
-
+
2020 Summer Olympics (Sports)
<
o
>
CoNtRoL PaNeL
 Colors
 Paper
 Layout
 Open

 Theme

 Sort

 Find

 Edit

 Delete


x
-
+
Help
<
o
>
x
-
+
To Do
<
o
>
x
-
+
Releases
<
o
>
x
-
+
X-Ray
<
o
>
x
-
+
Sites
<
o
>
x
-
+
Notes
<
o
>
x
-
+
Timer
<
o
>
x
-
+
Media
<
o
>
© 2017-2021 panes.us