Skip to content

Instantly share code, notes, and snippets.

iptables -A OUTPUT -d 127.0.0.0/8 -j ACCEPT
iptables -A OUTPUT --dst redis -j ACCEPT
iptables -A OUTPUT --dst postgres -j ACCEPT
iptables -P OUTPUT DROP
iptables -L
FROM debian:stretch
RUN apt-get update && \
apt-get install -y \
git \
build-essential \
python3 \
python3-pip \
pkg-config \
libsystemd-dev \
2017-11-22T16:57:07.259-0800 [DEBUGgoogle_bigquery_table.csp_reports: Importing from ID "reports"...
google_bigquery_table.csp_reports: Import complete!
] plugin.terraform-provider-google_v1.2.0_x4: 2017/11/22 16:57:07 [INFO] Instantiating Google Cloud Dataproc Client...
2017/11/22 16:57:07 [TRACE] root: eval: *terraform.EvalSequence
Imported google_bigquery_table (ID: reports)
google_bigquery_table.csp_reports: Refreshing state... (ID: reports)
2017-11-22T16:57:07.261-0800 [DEBUG] plugin.terraform-provider-google_v1.2.0_x4: 2017/11/22 16:57:07 [INFO] Reading BigQuery table: reports
2017-11-22T16:57:07.264-0800 [DEBUG] plugin.terraform-provider-google_v1.2.0_x4: panic: runtime error: index out of range
2017-11-22T16:57:07.264-0800 [DEBUG] plugin.terraform-provider-google_v1.2.0_x4:
2017-11-22T16:57:07.264-0800 [DEBUG] plugin.terraform-provider-google_v1.2.0_x4: goroutine 51 [running]:
@mattes
mattes / postico.md
Last active November 19, 2017 02:14
postico
cat client-key.pem <(echo) client-cert.pem <(echo) server-ca.pem > postico.pem
@mattes
mattes / readme.md
Last active November 14, 2017 04:01
raspberry pi kiosk mode
  1. Format SD card FAT32
  2. Download and copy files from https://www.raspberrypi.org/documentation/installation/noobs.md to SD card
  3. Plug Raspberry into TV with HDMI, and Ethernet cable to router, use Keyboard/Mouse to install.
  4. Run passwd to change the default password combination (pi:rasbperry)
  5. Finish configuration with sudo raspi-config:
    • Update
    • Hostname
    • Advanced Options > Overscan > Disable
    • Interfacing Options > SSH > Enable
  6. Connect to Wifi
DOMAIN=example.com
openssl req -new -newkey rsa:2048 -nodes -keyout $DOMAIN.key -out $DOMAIN.csr
cat STAR_$DOMAIN.crt COMODORSADomainValidationSecureServerCA.crt  COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > $DOMAIN.crt
openssl rsa -in $DOMAIN.key -text > $DOMAIN.pem

Ref: https://gist.github.com/bradmontgomery/6487319

SELECT * FROM pg_stat_activity WHERE client_port = -1;
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE client_port = -1;
@mattes
mattes / gist:40b5fac8231ca567e94416e7c88d2c10
Last active April 29, 2024 01:59
Multiple Google Chrome instances on MacOS
# http://peter.sh/experiments/chromium-command-line-switches/
mkdir -p /tmp/t1
open -na "Google Chrome" --args --user-data-dir=/tmp/t1 --remote-debugging-port=9222
# protip: press cmd+h to hide window

Keybase proof

I hereby claim:

  • I am mattes on github.
  • I am mattes (https://keybase.io/mattes) on keybase.
  • I have a public key ASC9U3hHQp2jiyutO3gmcTFwJD0Eig5yekL1bwSeRuwTtQo

To claim this, I am signing this object:

nohup command </dev/null >/dev/null 2>&1 &