Skip to content

Instantly share code, notes, and snippets.

View andiMenge's full-sized avatar
👋
hello

andiMenge

👋
hello
View GitHub Profile

Simple Page Navigation

const puppeteer = require('puppeteer');

const url = 'https://foo/bar';

(async () => {
  const browser = await puppeteer.launch({
 headless: false

Agility

Improvement Kata

The improvement kata is a routine for moving from the current situation to a new situation in a creative, directed, meaningful way. It is based on a four-part model:

1. In consideration of a vision or direction...
2. Grasp the current condition.
3. Define the next target condition.
4. Move toward that target condition iteratively, which uncovers obstacles that need to be worked on.

Networking

Network Tests/ Debugging

  • ICMP traceroute sudo mtr -rw google.de
  • TCP traceroute sudo mtr -P 80 -i 0.5 -rwc 50 google.de
@andiMenge
andiMenge / redis.md
Created September 12, 2018 09:19
about redis servers

Redis Knowledge

  • dbsize Print all keys in DB (incl. already expired keys)
  • list all keys redis-cli --scan --pattern '*' -h <redis-url>
  • debug populate 33 populate redis cluster with elements

Redis is single threaded! Check for blocking commands like keys *

Redis SCAN vs. KEYS Command

@andiMenge
andiMenge / database.md
Last active February 6, 2020 16:30
Some Database stuff

Mongodb

Backup and restore

  • If target container is not in the default network the argument --network <my-docker-network-name> has to be used with docker command.

Backup

docker run --rm --init --user 0 -v ${PWD}:/backups --link <mongodb-container-id>:src-mongodb mongo:4-xenial /bin/bash -c 'mongodump -h src-mongodb:27017 --db movie-favs --gzip --archive=/backups/$(date +"%d-%m-%Y")-mongodb.archive.gz'
@andiMenge
andiMenge / macOS.md
Last active July 6, 2018 13:11
usefull macOS stuff to remember

macOS

System Preferences

Toggle automatic software updates

sudo softwareupdate --schedule <off|on>

Change various Preferences

  • usage defaults usage
  • list all config domains defaults domains |tr ‘,’ '\n’
@andiMenge
andiMenge / http.md
Last active September 27, 2022 08:13
HTTP and HTTPie stuff

CORS PreFlight Request

http --follow --verbose OPTIONS http://localhost:1337/ Access-Control-Request-Method:GET Access-Control-Request-Headers:X-Requested-With Origin:localhost

Test TLS Connection

openssl s_client -tls1_2 -connect google.com:443