Skip to content

Instantly share code, notes, and snippets.

@drio
drio / tmux libevent
Created August 18, 2010 22:03
How to compile tmux
NOTE: I am using bash for this.
NOTE2: Another approach for getting tmux would be to use gentoo-prefix or netbsd's pkgsrc. I
didn't have too much luck with gentoo-prefix. NetBSD was pretty straight forward but it had
an old version of tmux (1.1).
Here is how to get tmux compiled if you can get your systadmins to installed it ... or
any other weird reason. I assume you have some basic libraries and headers installed (like
ncurses, etc...). If not, you'll have to compile those ones too.
@magnetikonline
magnetikonline / README.md
Last active December 22, 2021 17:13
Using Dnsmasq with Ubuntu 16.04LTS/14.04LTS/12.04LTS for virtual machine web application testing.

Using Dnsmasq with Ubuntu for VM web application testing

When running virtual machines under a Linux host system for testing web apps in various browsers (e.g. Internet Explorer), I found it rather tedious having to continually tweak the hosts file within each VM for the purpose of adding entries pointing back to the host machine's development web server address.

Instead the steps below will setup Dnsmasq on a Ubuntu 16.04LTS, 14.04LTS or 12.04LTS host machine for the purpose of serving both it's own DNS queries and that of virtual machine guests. Dnsmasq will parse the /etc/hosts file on your host machine where we will keep a single set of DNS entires to our test web application(s).

@karanth
karanth / parse-imap.md
Last active August 7, 2022 06:27
Notes on parsing IMAP responses

The IMAP protocol workflow consists of the following steps,

  • A network connection established between the client and the server.
  • A greeting message sent by the server indicating that the client has successfully connected.
  • A series of interactions between the client and server.

The interactions consists of strings of lines, i.e. string terminated by a carriage return and a line feed (CRLF or \r\n). Interactions can be both commands (sent by clients) and data (sent by clients and servers). Both the client and the server strictly interact using lines or known length octet streams (8-bit characters) followed by a line.

####Client

An IMAP client issues commands to the server in a CRLF terminated string. The syntax of a command includes a tag, followed by the command and parameters. A tag is an alphanumeric identifier and each client command has a different tag for that session. A tag could be something like but not limited to A1, A2 etc.

@thomasfr
thomasfr / autossh.service
Last active January 5, 2024 08:11
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@nerdalert
nerdalert / Netfilter-IPTables-Diagrams.md
Last active April 9, 2024 09:18
Linux NetFilter, IP Tables and Conntrack Diagrams

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

@DaveThw
DaveThw / mosquitto
Last active December 24, 2017 15:59
init.d script for mosquitto (on a Raspberry Pi)
#!/bin/bash
### BEGIN INIT INFO
# Provides: mosquitto
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start or stop the mosquitto service
### END INIT INFO
@novemberborn
novemberborn / howto.md
Created February 18, 2016 17:47
Creating a PKCS#12 file from a Let's Encrypt certificate
@stonehippo
stonehippo / docker_usb_guest_osx.md
Last active January 3, 2024 21:18
Getting a USB device to show up in a Docker container on OS X

Getting a USB device to show up in a Docker container on OS X

Some background

I was trying to get the Arduino IDE to work inside a Docker container on OS X. I was able to get the IDE working (see Getting X11 GUI applications to work on OS X with Docker), but I could not figure out how to make the USB port for the Arduino visible.

The solution

I first tried to directly map hardware serial port into the Docker container, doing something like this:

@puppybits
puppybits / docker-compose.yml
Last active September 5, 2020 08:35 — forked from andrefreitas/docker-compose.yml
sentry docker-compose
redis:
image: redis
postgres:
image: postgres
environment:
- POSTGRES_PASSWORD=sentry
- POSTGRES_USER=sentry
volumes:
- /var/lib/postgresql/data