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
@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active May 5, 2024 10:12
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@Bhavdip
Bhavdip / sketch-never-ending.md
Created October 6, 2016 15:53
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@mcfdn
mcfdn / Multiple Deploy Keys in GitHub.md
Last active November 21, 2022 14:02
Using multiple GitHub deploy keys on a single server with a single user

Using multiple GitHub deploy keys on a single server with a single user

Within GitHub it is possible to set up two types of SSH key - account level SSH keys and and repository level SSH keys. These repository level SSH keys are known in GitHub as deploy keys.

Deploy keys are useful for deploying code because they do not rely on an individual user account, which is susceptible to change, to “store” the server keys.

There is, however, an ‘issue’ with using deploy keys; each key across all repositories on GitHub must be unique. No one key can be used more than once. This becomes a problem when deploying to repositories to the same server with the same user. If you create two keys, the SSH client will not know which key to use when connecting to GitHub.

One solution is to use an SSH config file to define which key to use in which situation. This isn’t as easy as it seems.. you might try something like this:

@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
@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
@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
}
/*
@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
"""
@insdavm
insdavm / WireGuard-site-to-site.md
Last active May 3, 2024 21:19
Accessing a subnet that is behind a WireGuard client using a site-to-site setup

WireGuard Site-to-Site

Accessing a subnet that is behind a WireGuard client using a site-to-site setup

Problem Summary

We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.

Solution Summary

@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
@chriswayg
chriswayg / Ubuntu_Debian_Cloud_images_in_Proxmox.md
Last active May 21, 2024 19:42
Ubuntu and Debian Cloud images in Proxmox