Skip to content

Instantly share code, notes, and snippets.

@ghoneycutt
ghoneycutt / hosts.md
Created May 2, 2018 21:13
default /etc/hosts

macos

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
@extremecoders-re
extremecoders-re / qemu-networking.md
Last active May 4, 2024 05:55
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@guillochon
guillochon / ssh-airplane-wifi.md
Last active March 8, 2024 23:56
Instructions on how to SSH on airplane WiFi that blocks port 22

Using SSH through airplane WiFi that blocks port 22

Many aircraft that offer wifi only permit access to machines on port 80/443, the standard http(s) ports. If you want to SSH, you have to set up an intermediate machine that hosts the SSH service on either port 80 or 443. An easy (and free) way to do this is via a Google free-tier micro instance. These instances have a 1 GB transfer ceiling per month, but so long are you are only transmitting textual data a few days per month, this limit should not be easily exceeded. Set up one of these VMs via the Google Cloud console, and select CentOS 7 as the disk image. Make sure that you allow http/https traffic on the instance, the two checkboxes in the Firewalls section of the VM settings. Optionally, set a static external IP address for your server in the VM config, in case you don't want to look up the IP each time. Then, ssh into the new VM (the IP address will be listed as the "external IP" in the list of instances) and edi

@agarrharr
agarrharr / index.md
Last active December 27, 2023 18:18
Common Ledger CLI Commands

Common Ledger CLI Commands

  • Income vs expenses this month?

    $ ledger balance income expenses --period "this month"
  • What did my budget look like at a certain date?

@fikovnik
fikovnik / configuration.nix
Last active July 12, 2022 06:29
NixOS on DELL XPS 13 9360
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@nepsilon
nepsilon / how-to-use-mac-keychain-to-store-github-repos-credentials.md
Created July 18, 2017 06:50
How to use Mac KeyChain to store GitHub repos credentials? — First published in fullweb.io issue #108

How to use Mac KeyChain to store GitHub repos credentials?

You know the pain, you cloned a repo over HTTPS, and now Git asks you for your password each time you want to push or pull.

Chances are you already have the git credential-osxkeychain command installed. If not, just install Git with brew: brew install git.

Once installed, just tell Git to use the KeyChain to store your credentials:

git config --global credential.helper osxkeychain
@mterwill
mterwill / USAGE.md
Last active February 16, 2024 09:23
Beancount importers, scripts, etc.

Note: everything here is pretty specific to my usage/accounts and not written for public use... You'll probably have to tweak a bunch of stuff.

$ bean-extract config.py ~/Downloads # the csvs should be in here
@up1
up1 / 1.txt
Last active December 17, 2017 03:18
Docker with JVM
$docker run -m 200MB openjdk:8u131-jre-alpine java -XshowSettings:vm -version
VM settings:
Max. Heap Size (Estimated): 444.50M
Ergonomics Machine Class: server
Using VM: OpenJDK 64-Bit Server VM
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (IcedTea 3.4.0) (Alpine 8.131.11-r1)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
@mosquito
mosquito / README.md
Last active May 7, 2024 11:49
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service