Skip to content

Instantly share code, notes, and snippets.

@benitogf
benitogf / mirror.sh
Last active May 14, 2024 05:25
ZFS mirror ubuntu boot drive
#!/bin/sh
# Assumptions and requirements
# - All drives will be formatted. These instructions are not suitable for dual-boot
# - No hardware or software RAID is to be used, these would keep ZFS from detecting disk errors and correcting them. In UEFI settings, set controller mode to AHCI, not RAID
# - These instructions are specific to UEFI systems and GPT. If you have an older BIOS/MBR system, please use https://openzfs.github.io/openzfs-docs/Getting%20Started/Ubuntu/Ubuntu%2020.04%20Root%20on%20ZFS.html
# change the these disks variables to your disks paths (check with lsblk)
DISK1="/dev/nvme0n1"
DISK2="/dev/nvme1n1"
@benitogf
benitogf / Microsoft.PowerShell_profile.ps1
Last active June 22, 2021 06:59
PowerShell profile
# https://superuser.com/questions/1199882/powershell-auto-complete-settings
# https://stackoverflow.com/questions/8264655/how-to-make-powershell-tab-completion-work-like-bash
# https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/SamplePSReadLineProfile.ps1
# https://gist.github.com/jchandra74/5b0c94385175c7a8d1cb39bc5157365e
# https://www.hanselman.com/blog/HowToMakeAPrettyPromptInWindowsTerminalWithPowerlineNerdFontsCascadiaCodeWSLAndOhmyposh.aspx
# to install dependencies run from pwshell:
# Install-Module posh-git -Scope CurrentUser
# Install-Module oh-my-posh -Scope CurrentUser
# Install-Module -Name 'Get-ChildItemColor' -Scope CurrentUser
@benitogf
benitogf / pyscrap
Created August 9, 2015 01:40
scraping with python
#!/usr/bin/env python
import re, urlparse
from selenium import webdriver
from time import sleep
import unittest
#Articles
#http://toddhayton.com/2015/02/03/scraping-with-python-selenium-and-phantomjs/
#https://realpython.com/blog/python/headless-selenium-testing-with-python-and-phantomjs/