Skip to content

Instantly share code, notes, and snippets.

View install-miner.sh
sudo apt-get install openssh-server
wget https://github.com/nanopool/nanominer/releases/download/v1.4.0/nanominer-linux-1.4.0.tar.gz
tar -xvzf ./nanominer-linux-1.4.0.tar.gz
cd nanominer-linux-1.4.0/
nano config.ini
./nanominer -d
wget --referer=http://support.amd.com https://drivers.amd.com/drivers/linux/amdgpu-pro-19.20-812932-ubuntu-18.04.tar.xz
@adamlacombe
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'})
.split('\n');
View nodemailer.js
import * as nodemailer from 'nodemailer';
let transporter = nodemailer.createTransport({
host: 'smtp.gmail.com',
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
adamlacombe / php-7-1-symlink.sh
Created Mar 22, 2018
Reset PHP symlink to 7.1
View php-7-1-symlink.sh
View keybase.md

Keybase proof

I hereby claim:

  • I am adamlacombe on github.
  • I am adamlacombe (https://keybase.io/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.