Skip to content

Instantly share code, notes, and snippets.

sudo apt-get install openssh-server
tar -xvzf ./nanominer-linux-1.4.0.tar.gz
cd nanominer-linux-1.4.0/
nano config.ini
./nanominer -d
wget --referer=
adamlacombe / wsl2-replace-ip-in-hosts.ts
Created Jun 17, 2019
Replaces ip address in hosts file with the WSL2 container's ip
View wsl2-replace-ip-in-hosts.ts
import * as shelljs from 'shelljs';
import * as fs from 'fs';
let modifyHosts = ['somehost.tld', 'testing.localdev'];
(shelljs.exec(`ip addr | grep "scope global eth0"`, {async: true}).stdout as any).on('data', (data) => {
if (data.includes('scope global eth0')) {
let ip = data.replace('inet ', '').split('/')[0].trim();
let hosts = fs.readFileSync("/mnt/c/Windows/System32/drivers/etc/hosts", {encoding: 'utf-8'})
View nodemailer.js
import * as nodemailer from 'nodemailer';
let transporter = nodemailer.createTransport({
host: '',
port: 465,
secure: true,
auth: {
user: '',
pass: '',
View iis-log-regex.txt
(?P<timestamp>\S+ \S+) \S+ \S+ (?P<server_ip>\S+) (?P<method>GET|POST) (?P<url>.*?) \S+ (?P<port>\d+) - (?P<ip>\S+) (?P<http_version>\S+) (?P<extra>.*?) (?P<referrer>:- -|\S+) (?P<domain>\S+) (?P<status>\d+) .*
adamlacombe /
Created Mar 22, 2018
Reset PHP symlink to 7.1

Keybase proof

I hereby claim:

  • I am adamlacombe on github.
  • I am adamlacombe ( on keybase.
  • I have a public key ASCJWdFGMwWeKiM9n2vxNGe1OaQwxhQhlzstC15-yYzFlwo

To claim this, I am signing this object:

You can’t perform that action at this time.