- Setup hostname a. set dock and menu to autohide b. removed all items from dock
- create new ssh keys
- Download homebrew
- brew install:
- git
- wezterm
| #!/bin/bash | |
| total_watches=0 | |
| total_instances=0 | |
| for pid in $(ls /proc | grep -E "^[0-9]+$"); do | |
| for fd in $(ls /proc/$pid/fd 2>/dev/null); do | |
| link=$(readlink /proc/$pid/fd/$fd 2>/dev/null) | |
| if [[ "$link" == "anon_inode:inotify" ]]; then | |
| total_instances=$((total_instances + 1)) |
| #!/bin/bash | |
| TARGET_PERCENT=${1:-60} | |
| WATCH_LIMIT=$(cat /proc/sys/fs/inotify/max_user_watches) | |
| TARGET_WATCHES=$((WATCH_LIMIT * TARGET_PERCENT / 100)) | |
| echo "===================================" | |
| echo "Inotify Watch Consumer (Fixed)" | |
| echo "===================================" | |
| echo "System limit: $WATCH_LIMIT watches" |
| class Node { | |
| constructor(val) { | |
| this.data = val; | |
| this.left = null; | |
| this.right = null; | |
| } | |
| getChildren() { | |
| let children = [] | |
| if (this.left) { |
| class Node { | |
| constructor(val) { | |
| this.data = val; | |
| this.left = null; | |
| this.right = null; | |
| } | |
| getChildren() { | |
| let children = [] |
| let nodes = [] // list of nodes | |
| const ROOT //binary tree with getChildren function implemented | |
| getNodes(ROOT.getChildren()) // start recursion with no level_index so default is used | |
| function getNodes(level, level_index = 0) { | |
| level.forEach(node => { // loop threw nodes in the level | |
| if (Array.isArray(nodes[level_index])) { | |
| nodes[level_index].push(node) // if node already in this level then add |
| function rememberTheme (theme) { | |
| // Persist in sessionStorage so theme is applied | |
| // across pages with file:/// apply remembered theme | |
| sessionStorage.setItem('mdbook-theme', theme) | |
| // Persist to localStorage for normal usage as well | |
| localStorage.setItem('mdbook-theme', theme) | |
| } | |
| function getTheme () { | |
| var theme |
| resource "aws_alb" "alb_qriket" { | |
| name = "${var.environment}-alb-qriket" | |
| subnets = ["${var.public_subnet_ids}"] | |
| security_groups = ["${var.security_groups_ids}", "${aws_security_group.web_inbound_sg.id}"] | |
| tags { | |
| Name = "${var.environment}-alb-qriket" | |
| Environment = "${var.environment}" | |
| } | |
| } |
| data "template_file" "web_task" { | |
| template = "${file("${path.module}/tasks/web_task_definition.json")}" | |
| vars { | |
| image = "${aws_ecr_repository.qriket_app.repository_url}" | |
| secret_key_base = "${var.secret_key_base}" | |
| database_host = "${var.database_endpoint}" | |
| database_user = "${var.database_username}" | |
| database_pass = "${var.database_password}" | |
| database_name = "${var.database_name}" |
| resource "aws_security_group" "ecs_service" { | |
| vpc_id = "${var.vpc_id}" | |
| name_prefix = "${var.environment}-ecs-service-sg" | |
| description = "Allow egress from container" | |
| egress { | |
| from_port = 0 | |
| to_port = 0 | |
| protocol = "-1" | |
| cidr_blocks = ["0.0.0.0/0"] |