Skip to content

Instantly share code, notes, and snippets.

View johnrlive's full-sized avatar

John Rodriguez johnrlive

  • NY
View GitHub Profile
@johnrlive
johnrlive / 1. linux utilities.md
Created March 21, 2019 14:57 — forked from Integralist/1. linux utilities.md
Different Linux utility commands (e.g. top, ps, strace, lsof, netstat, ifconfig, iftop, iptraf, tcpdump, wireshark)

Start up a container (whichever Linux flavour takes your fancy):

docker run -it ubuntu /bin/bash
docker run -it centos /bin/bash
  • top: check what CPU and Memory running processes are utilising
  • ps: see what processes are running
  • strace: monitor interactions between processes
@johnrlive
johnrlive / cloudflare-ddns-update.sh
Created September 5, 2019 04:59 — forked from Tras2/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
@johnrlive
johnrlive / .env.php
Created November 21, 2019 14:31
WordPress environment variables
<?php
define('DB_HOST', 'localhost');
define('DB_NAME', 'name');
define('DB_USER', 'user');
define('DB_PASSWORD', 'password');
/**
* You can also include other environment specifc
* definitions here, such as enabling debug for
# Rails production setup via SQLite3 made durable by https://litestream.io/
# Copy this to Dockerfile on a fresh rails app. Deploy to fly.io or any other container engine.
#
# try locally: docker build . -t rails && docker run -p3000:3000 -it rails
#
# in production you might want to map /data to somewhere on the host,
# but you don't have to!
#
FROM ruby:3.0.2