|
@@ -45,6 +45,14 @@ sudo chown -R apache:ec2-user path/to/wordpress
|
|
|
or
|
|
|
sudo chown -R apache:apache path/to/wordpress
|
|
|
|
|
|
+## Lambda
|
|
|
+### Creating a Lambda function (with cli IAM role creation)
|
|
|
+- first, create trust-policy.json
|
|
|
+- second, create role
|
|
|
+ - aws iam create-role --role-name {some role name} --assume-role-policy-document file://trust-policy.json
|
|
|
+- third, attach permissions
|
|
|
+ - aws iam attach-role-policy --role-name {some role name} --policy-arn arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
|
|
|
+
|
|
|
## Viewing logs from CLI
|
|
|
- aws logs commands:
|
|
|
- combined command, to get most recent log stream for a log group:
|
|
@@ -194,6 +202,13 @@ sudo chown -R apache:apache path/to/wordpress
|
|
|
* --jobs=X to run parallel installs
|
|
|
* for full system/world update:
|
|
|
* sudo emerge --update --changed-use --deep --ask --with-bdeps=y @world
|
|
|
+# GIMP
|
|
|
+## Highlight a section of an image
|
|
|
+- Select a brush
|
|
|
+- choose "Darken Only" mode.
|
|
|
+- Set size and color of brush
|
|
|
+- Click start of area to highlight. Hold shift. Click end of area.
|
|
|
+
|
|
|
# GIT
|
|
|
## delete files from history (specifically large files)
|
|
|
### using bfg - recommended for removing large files
|
|
@@ -229,8 +244,15 @@ git show branch:filepath/filename
|
|
|
## grep / search history of files (source code)
|
|
|
git grep {regex to search} $(git rev-list --all)
|
|
|
# GPG
|
|
|
-## reset gpg-connect-agent / when borking pw entry
|
|
|
+## reset gpg-connect-agent / clear stored passwords
|
|
|
- echo RELOADAGENT | gpg-connect-agent
|
|
|
+# I3 (i3wm, window manager )
|
|
|
+## Move a window to a named workspace:
|
|
|
+- (mod+d to bring up dmenu) - i3-msg move container to workspace number 1 firefox
|
|
|
+## open a named workspace
|
|
|
+- (mod+d to bring up dmenu) - i3-msg workspace number 1 firefox
|
|
|
+
|
|
|
+
|
|
|
# Javascript
|
|
|
## Run Prettier for code formatting, w/in vim
|
|
|
- :Prettier
|
|
@@ -270,6 +292,12 @@ jupyter labextension install jupyter-matplotlib
|
|
|
- This helped a great deal with an i3-based install, anyway
|
|
|
|
|
|
# LINUX
|
|
|
+## install .deb package
|
|
|
+sudo dpkg -i filename.deb
|
|
|
+## OCR (extract text from image)
|
|
|
+- use tesseract-ocr
|
|
|
+- tesseract-ocr input.png output.txt
|
|
|
+
|
|
|
## toggle caps lock when xmm applied recklessly... locking CAPS LOCK on
|
|
|
- xdotool key Caps_Lock
|
|
|
## Webcam/sound Recording tips
|
|
@@ -462,6 +490,8 @@ file -i {filename}
|
|
|
- can always use 'kill -9'
|
|
|
|
|
|
# NODE, NPM, NVM
|
|
|
+## Remap port 80 to port 3000, to access express app
|
|
|
+sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000
|
|
|
## install nvm
|
|
|
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
|
|
|
## nvm - install node
|
|
@@ -520,6 +550,10 @@ file -i {filename}
|
|
|
## change user/role pw:
|
|
|
- \password {username}
|
|
|
# PYTHON
|
|
|
+## super simple http server (!!)
|
|
|
+python3 -m http.server 1337
|
|
|
+- 1337 = port, optional
|
|
|
+
|
|
|
## install alternate version
|
|
|
### update, install deps
|
|
|
$ sudo apt update
|