Skip to content

Instantly share code, notes, and snippets.

View anjakammer's full-sized avatar

Anja Kammer anjakammer

View GitHub Profile
@anjakammer
anjakammer / installing-postman.md
Created September 28, 2023 16:00 — forked from pmkay/installing-postman.md
Installing Postman on Ubuntu/Gnome

Since Chrome apps are now being deprecated. Download postman from https://dl.pstmn.io/download/latest/linux

Although I highly recommend using a snap

sudo snap install postman

Installing Postman

tar -xzf Postman-linux-x64-5.3.2.tar.gz
@anjakammer
anjakammer / README.md
Created April 13, 2023 12:25 — forked from LongLiveCHIEF/README.md
Run node, npm, npx, yarn as container

Developing with Node, without installing node!

Note: currently only works on *nix systems (until a powershell script can be created)

With the technique below, you can run node, npm, npx, or yarn commands as if the programs were installed natively on your system, and you won't even know the difference! This includes any ports that your app or dev process will start up and use for development, as well as compatibility with persistent npm config --global cli usage.

See more in the Usage section below.

@anjakammer
anjakammer / userdata.sh
Created September 5, 2022 15:58 — forked from Riebart/userdata.sh
EC2 user data for setting up an EC2 instance with SSM and deploying into an ECS cluster.
#!/bin/bash
# Install the SSM agent:
# Ref: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-startup-linux.html
cd /tmp
sudo yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm
sudo start amazon-ssm-agent
echo ECS_CLUSTER="ECS_CLUSTER_NAME" >> /etc/ecs/ecs.config
export PATH=/usr/local/bin:$PATH
# install snap
sudo apt install snapd
# install microk8s
snap install microk8s --classic
# enable dns, dashboard, and storage
microk8s.enable dns dashboard storage metrics-server
microk8s.kubectl proxy --accept-hosts=.* --address=0.0.0.0 &
@anjakammer
anjakammer / Dockerfile
Last active August 17, 2021 17:13 — forked from thom-nic/Dockerfile
Dockerfile that attempts to run the app as non-root user. This creates a `node` user & sets permissions on app files. Note you cannot `chown` files in a docker 'volume' during the build process, but you can at runtime (as part of your `CMD`) but in
###
# Node.js app Docker file
#
# Some basic build instructions:
# ```
# # you should delete node_modules b/c you don't want that copied during 'ADD'
# docker build -t thom-nic/node-bootstrap .
# # run a shell in the container to inspect the environment (as root):
# docker run --rm -itu root thom-nic/node-bootstrap /bin/bash
# ```
@anjakammer
anjakammer / delete-evicted-pods-all-namespaces.sh
Last active August 17, 2021 17:15 — forked from psxvoid/delete-evicted-pods-all-namespaces.sh
Delete evicted pods from all namespaces (also ImagePullBackOff and ErrImagePull)
#!/bin/sh
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d
# delete all evicted pods from all namespaces
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff state from all namespaces
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces
Description Error Resolution
No Jenkins service found in development namespace  anoop@myMac ~ $ jx create lile
? Pick a name for the new project: mygrpc
Created lile project at mygrpcect: (myapp)
mygrpc error: no Jenkins service be found in the development namespace!
Are you sure you installed Jenkins X? Try: http://jenkins-x.io/getting-started/
anoop@myMac ~ $
Your user account is lacking permissions, see section 'Elevate privileges for ClusterRoleBindings'
jx hangs/kubectl top node shows heavy load  anoop@myMac ~ $ kubectl top nodes | awk {'print $1 " " $3'}
NAME CPU%
gke-jx-default-pool-47e201fa-hwc9 14%
gke-jx-default-pool-47e201fa-pjmd 82%
gke-jx-default-pool-47e201fa-v3cl 23%
Increase the number of nodes atleast to 4
jenkins-maven node offline [Pipeline] node``Still waiting to schedule task``All nodes of label ‘jenkins-maven’ are offline check the status of all th
@anjakammer
anjakammer / bash.sh
Last active August 17, 2021 17:12
running steam shows message: 'Fatal error: Failed to load steamui.so'
# open terminal
env STEAM_RUNTIME=1 steam
# outputs that 'libGL.so.1' lib is missing
# run:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/libGL.so.1
# run steam again, should work now.
@anjakammer
anjakammer / readme.sh
Last active August 17, 2021 17:12
how to repair grub failure after windows update aka grub rescue issue
# boot from live cd with compatibility mode
# open terminal
sudo fdisk -l
# get the linux partition => /dev/nvme0n1p4
# count the partitions, better make a screenshot of it
mkdir mnt
sudo mount /dev/nvme0n1p4 mnt
ls mnt/boot
# does grub exists? Good, we need that information
# ----------------
@anjakammer
anjakammer / redshift.conf
Last active August 17, 2021 17:12
multimonitor Redshift config file (~/.config/redshift.conf) Install: https://itsfoss.com/install-redshift-linux-mint/ Put to Start up Applications
; Global settings
[redshift]
temp-day=6000
temp-night=5000
transition=1
;gamma=0.8:0.7:0.8
gamma=1.000:1.000:1.000
;location-provider=geoclue
;location-provider=manual
adjustment-method=randr