Skip to content

Instantly share code, notes, and snippets.

View RENANZG's full-sized avatar
📤
💥 ฅ^•ﻌ•^ฅ

Renan Zamboni Gomes RENANZG

📤
💥 ฅ^•ﻌ•^ฅ
View GitHub Profile
@dllud
dllud / pdfocr
Created February 9, 2014 01:10
pdfocr - script to transform a PDF containing a scanned book into a searchable PDF
#!/bin/bash
# This is a script to transform a PDF containing a scanned book into a searchable PDF.
# Based on previous script and many good tips by Konrad Voelkel:
# http://blog.konradvoelkel.de/2010/01/linux-ocr-and-pdf-problem-solved/
# http://blog.konradvoelkel.de/2013/03/scan-to-pdfa/
# Depends on convert (ImageMagick), pdftk and hocr2pdf (ExactImage).
# $ sudo apt-get install imagemagick pdftk exactimage
# You also need at least one OCR software which can be either tesseract or cuneiform.
# $ sudo apt-get install tesseract-ocr
@philippelatulippe
philippelatulippe / android-multi-boot.md
Last active March 17, 2024 02:32
Android dual-boot / multi-boot

I'm experimenting with sharing my notes for dead-end projects like these. Maybe they'll be useful for someone who stumbles on them.

I have a Nexus 4, I'm hoping to run CM and Firefox OS. I want CM auto-updates to work, I'd rather not build my own kernel. It needs to be completely open source, with no dubious binaries to download.

  • Ubuntu Phone has a tool for dual-booting with android. The details make it sound quite simple.
  • The state of the art seems to be MultiRom which uses kexec.

MultiRom

Interrupts boot process with an OS picker, then uses kexec to run the other OS.

@varqox
varqox / install_debian_with_debootstrap_howto.md
Last active June 14, 2024 02:58
Instructions how to install Debian using debootstrap
@GAS85
GAS85 / split_tunnel_VPN.md
Last active June 20, 2024 14:30
Force Torrent/user Traffic through VPN Split Tunnel on Ubuntu 16.04
@judy2k
judy2k / phony.py
Created January 23, 2019 16:32
Phony! Fake phone number generator.
#!/usr/bin/env python3
import argparse
from random import randint, choice
def uk():
return randint(447700900000, 447700900999+1)
def us_area_code():
@reillysiemens
reillysiemens / signing-vbox-kernel-modules.md
Last active June 20, 2024 02:56
Signing VirtualBox Kernel Modules

Signing VirtualBox Kernel Modules

These are the steps I followed enable VirtualBox on my laptop without disabling UEFI Secure Boot. They're nearly identical to the process described on [Øyvind Stegard's blog][blog], save for a few key details. The images here are borrowed from the [Systemtap UEFI Secure Boot Wiki][systemtap].

  1. Install the VirtualBox package (this might be different for your platform).
    src='https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo'
@HardenedArray
HardenedArray / Efficient UEFI Encrypted Root and Swap Arch Linux Installation Procedure with an ENCRYPTED BOOT
Last active May 14, 2024 13:45
Efficient UEFI Encrypted Root and Swap Arch Linux Installation with an ENCRYPTED BOOT
# OBJECTIVE: Install Arch Linux with encrypted root and swap filesystems with an ENCRYPTED BOOT and boot from UEFI. We will
also decrypt and mount our entire encrypted system using a single LUKS passphrase entry.
# Note: This method supports both dedicated Arch installs and those who wish to install Arch on a multi-OS-UEFI booting system.
# External USB HDD/SSD Installers Notes: Encrypted Arch installs can be booted and run from an external USB HDD or SSD, but
# only when the installation is correctly set up. There are several necessary changes to my standard procedure you'll want
# to make during the install process. Read my External USB HDD/SSD Installation section below before proceeding.
@gbrlsnchs
gbrlsnchs / README.md
Last active June 8, 2024 17:58
Void Linux Installation Guide (UEFI + chroot + brtfs + LUKS-encrypted root and swapfile)

Installation guide for Void Linux with LUKS-encrypted btrfs root

NOTE

I have ported this Gist to a handbook. I'll not maintain this Gist anymore, but will keep it here for future references. You can access the respective chapter in the handbook here.

Introduction

In this guide you will find:

  • btrfs with Zstandard compression
  • LUKS-encrypted root and swapfile
  • GRUB with UEFI
  • Based on https://gist.github.com/mdziekon/221bdb597cf32b46c50ffab96dbec08a
  • Installation date: 16-08-2019
  • Additional notes based on my own experience
  • EFI boot
  • Ubuntu 19.04 -> 21.04
  • This should work on any computer. Only the RAID > AHCI change described below and the device name for the nvme ssd drive are specific to this laptop.
  • The process describes a completely fresh installation with complete repartitioning, however it should work fine when Windows is already installed (eg. brand new machine with Windows preinstalled) as long as Windows already boots with EFI.
  • The process was conducted on Dell's XPS 15 9560 (2017) with specs:
  • CPU: i7-7700HQ
@da-n
da-n / usb-unlock-luks.md
Created August 24, 2019 13:11
Unlock LUKS full disk with USB stick

Configuration for passwordless root filesystem

Source: https://www.howtoforge.com/tutorial/passwordless-encryption-of-linux-root-partition/

The process of entering the passphrase at boot time will now be automated using an USB memory stick. Instead of using a passphrase , the secret key on the USB will decrypt the encrypted volumes. Connect an USB stick to the VM and locate it using the dmesg command. It is detected as /dev/sdb in my VM.

The secret key of 8192 random byte is extracted from the usb stick using the dd command.

dd if=/dev/sdb of=/root/secret.key bs=512 skip=4 count=16