Skip to content

Instantly share code, notes, and snippets.

View eesa1980's full-sized avatar

Lewis James-Odwin eesa1980

  • Cardiff
View GitHub Profile
@eesa1980
eesa1980 / revert-multiple-git-commits.md
Last active August 1, 2022 13:18
Revert to old commit #git #revert #reset
@eesa1980
eesa1980 / terraform-notes.md
Last active August 1, 2022 06:53
Terraform notes #terraform

Start terraform project

terraform init

Terraform plan (shows what terraform is planning to do)

terraform plan -out <file_name>

Apply the plan (Deploy to AWS)

terraform apply <file_name>

Destroy (delete deployed plan)

@eesa1980
eesa1980 / reset-keyboard.md
Created July 7, 2022 09:27
Force keyboard assistant on mac #mac #keyboard

If the keyboard key arent quite working properly.

  • Delete plist
$ sudo rm /Library/Preferences/com.apple.keyboardtype.plist
  • Restart computer

The problem should now be solved

@eesa1980
eesa1980 / aws_commands.md
Last active May 31, 2022 20:17
How to see or edit AWS credentials #aws #credentials #command
# See profiles
$ aws configure list-profiles

# Open and edit profiles
$ open ~/.aws/credentials
@eesa1980
eesa1980 / exit_on_fail.sh
Created May 25, 2022 13:21
Exit bash script on failure #bash #script
set -e
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
trap 'echo "\"${last_command}\" Error: pipeline failed with exit code $?."' EXIT
@eesa1980
eesa1980 / docker-commands.md
Last active May 13, 2022 10:00
Docker Commands #docker #commands #dockercommands

Start (run)

$ docker run -dp 8080:8080 -it <container-name>

Build

$ docker build . -t <tag name>
@eesa1980
eesa1980 / install-mongo-db.md
Last active May 13, 2022 10:08
Install Mongo DB #Mongo
@eesa1980
eesa1980 / tsconfig.json
Created July 4, 2021 16:02
#tsconfig #node
{
"compilerOptions": {
"sourceMap": true,
"target": "es6",
/* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ "module": "commonjs",
/* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ "allowJs": true,
/* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ "outDir": "./build",
/* Redirect output structure to the directory. */ "rootDir": ".",
/* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ "strict": true,
/* Enable all strict type-checking options. */ "noImplicitAny": false,
@eesa1980
eesa1980 / .prettierignore
Last active May 13, 2022 10:12
Prettier Ignore Config #prettier #prettierignore #config
build
coverage
amplify
amplify-backup
src/graphql/
types/API.ts