Skip to content

Instantly share code, notes, and snippets.

View diogopms's full-sized avatar
🏠
Working from home (🇵🇹)

Diogo Serrano diogopms

🏠
Working from home (🇵🇹)
View GitHub Profile
@gjreasoner
gjreasoner / README.md
Last active April 25, 2024 01:42
Expand Ubuntu 20 Proxmox Disk
# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button

# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                         8:0    0    1T  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    1G  0 part /boot
└─sda3                      8:3    0    1T  0 part
@qdm12
qdm12 / README.md
Last active July 17, 2024 04:45
Wireguard and iptables restrictions for multiple users

Wireguard and iptables restrictions for multiple users

If you don't know what Wireguard is, well, you should. It's fast, easy to setup and highly configurable. We will configure Wireguard for multiple users with various restrictions using iptables.

Assumptions

This should fit most setups (not mine though 😉)

1. Configurar IPv4 estático e IPv6 estático no pihole (YMMV)
192.168.1.2 e 2001:818:xxxx::192:168:1:2 no meu caso
2. Configurar DNS uplink do pihole igual ao IP do Router (192.168.1.1)
3. Configurar Router
Huawei HS8247W (Smart Router 2)
1. Configurações Avançadas -> LAN -> Configuração de DHCP
Servidor DNS Primário: 192.168.1.2
@emilio-martinez
emilio-martinez / alibaba-vendor.md
Last active February 5, 2024 12:47
Topin 365GPS Server config

365GPS office address Contact: Erik Liu Address: 505 Block B, Donglian Building, Chuangye Second Road, Baoan District, Shenzhen, Guangdong, China(广东省深圳市宝安区创业二路东联大厦B座505,洪浪北地铁站旁) Mobile/ wechat/ whatsapp: +86-13480999031
Alibaba: 365gps.en.alibaba.com Skype: topin.sales
E-mail: topin.sales3@qq.com

============================================================= Hi

@chriswayg
chriswayg / Ubuntu_Debian_Cloud_images_in_Proxmox.md
Last active June 23, 2024 08:13
Ubuntu and Debian Cloud images in Proxmox
@cronosnull
cronosnull / installKafkaStandalone.sh
Created May 29, 2019 09:40
Install kafka statndalone.
#!/bin/bash
# This script install kafka 2.2.0
# on a centos 7 machine
## RUN AS SUDO
if [[ $EUID -gt 0 ]]
then
echo "Please run as root/sudo"
exit 1
fi
@webcpu
webcpu / monitor.py
Last active June 28, 2019 21:28
Reboot ethOS when any miner's hash rate is too low.
#!/usr/bin/env python3
import os
# 1. Save this file in /home/ethos/monitor.py on your ethOS
# 2. Change permission to make it executable
# chmod 0755 /home/ethos/monitor.py
# 3. Run crontab
# # crontab -e
# 4. Schedule a cron task to execute every 5 minutes
"""
@kmikiy
kmikiy / crypto.gs
Last active June 16, 2022 12:17
Google Sheets Apps Script for fetching latest crypto price from Binance
function BINANCE_PRICE(coinsymbol, pair) {
var url = "https://api.binance.com/api/v3/ticker/price?symbol="+coinsymbol.toUpperCase()+pair.toUpperCase()
var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true});
var json = response.getContentText();
var data = JSON.parse(json);
return data.price
}
/*
@jaydlawrence
jaydlawrence / check_hashrate_reboot.py
Last active June 28, 2019 21:28
Script to check the hashrate of ethereum worker on ethOs and reboot if the hashrate is 0 for 2 runs of this script. This script is for a single GPU, or rather it will only reboot if the overall hashrate reaches 0. It also uses the pushover service to push notifications for when the script triggers a reboot.
import subprocess
import os
import re
import sys
import argparse
import httplib, urllib
import time
"""
# place this file at /home/ethos/check_hash_reboot.py
@erikmuttersbach
erikmuttersbach / join-freighthub-engineering.md
Last active April 10, 2018 12:27
Join FreightHub Engineering

About FreightHub: The Company

At FreightHub, we’re building the backbone of global trade. We are revolutionizing logistics by making it easier, faster, and more cost efficient to move goods from any point A to point B in the world – on container ships, airplanes, trucks and trains. By radically automating processes and designing for a superior user experience we make buying and selling goods anywhere on the globe as efficient as never before.
If you want to create impact with your work, solve real-world problems, and digitize a multi-trillion-€ industry that fosters global prosperity, we’d love you to join FreightHub!

Screen_Shot_2017_03_13_at_13_07_58