Skip to content

Instantly share code, notes, and snippets.

View erikbye's full-sized avatar

Erik Bredvold Bye erikbye

View GitHub Profile
https://www.alchemistowl.org/pocorgtfo/pocorgtfo15.pdf
#!/usr/bin/env ruby
#
# Recreate Lightroom catalog by replacing corrupt files with recovered copies
#
# Keeps the directory structure and creates the new catalog in a new path,
# which means you'll need at least 3x the size of your photos of free space.
#
# Dependencies:
# - ruby
# - exiftool
@erikbye
erikbye / user.js
Last active May 19, 2020 11:51
Firefox user.js for increased security, privacy and less annoyances
user_pref("network.http.sendRefererHeader", 0);
user_pref("browser.send_pings", false);
user_pref("geo.enabled", false);
user_pref("dom.webnotifications.enabled", false);
user_pref("dom.event.clipboardevents.enabled", false);
user_pref("network.IDN_show_punycode", true);
@erikbye
erikbye / .zshrc
Last active May 31, 2020 08:51
.zshrc
## Options section
setopt correct # Auto correct mistakes
setopt extendedglob # Extended globbing. Allows using regular expressions with *
setopt nocaseglob # Case insensitive globbing
setopt rcexpandparam # Array expension with parameters
setopt nocheckjobs # Don't warn about running processes when exiting
setopt numericglobsort # Sort filenames numerically when it makes sense
setopt nobeep # No beep
setopt appendhistory # Immediately append history instead of overwriting
setopt histignorealldups # If a new command is a duplicate, remove the older one
# disable PC speaker
rmmod pcspkr
loadkeys no
# check if UEFI or BIOS
ls /sys/firmware/efi/efivars
echo "If output above displays files you're using UEFI, if directory does not exist you're using BIOS."
ip link
echo "Use wifi-menu if you need to setup wifi for internet connectivity."
@erikbye
erikbye / git-compile-openssl.sh
Last active May 31, 2020 08:49
Compile git with openssl instead of gnutls
#!/bin/bash
# for debian based distros
function installDep()
{
sudo apt-get install -y build-essential fakeroot dpkg-dev
sudo apt-get -y build-dep git
sudo apt-get install -y libcurl4-openssl-dev
}
function compileGit()
@erikbye
erikbye / post_install.ps1
Last active April 22, 2024 13:24
Simple PowerShell script for installing Chocolatey and a a bunch of software I use
$cachefolder = "c:\temp\chocolatey_cache"
$logfolder = "c:\temp"
if (!(Test-Path -Path $cachefolder)) {
New-Item -ItemType Directory -Force -Path $cachefolder | Out-Null
}
Set-Location -Path $logfolder
$choco = Get-Command -Name "choco" -ErrorAction Ignore;
if (!$choco) {