Skip to content

Instantly share code, notes, and snippets.

@jlgaddis
jlgaddis / yubikey_gpg-agent_fedora27.md
Last active April 8, 2022 01:09
Yubikey + gpg-agent on Fedora 27 (XFCE)

Yubikey + gpg-agent (w/ SSH support) on Fedora 27

Note: This assumes that you have already generated your GPG keys (i.e., offline master key + subkeys) and have them in your Yubikey.

Recently, I switched from Arch Linux to Fedora 27 on the hosts that I use daily (my workstation, my "primary" laptop, and a "secondary" laptop). As best as I can recall, here are all of the steps I had to do in order to get things working in addition to some notes ("quoted") that I made at the time.

FWIW, this is greatly "summarized" but I think I've included most of the important bits. It's very possible that I've left out some pieces, though, so feel free to let me know if I've missed something.


@fawkesley
fawkesley / randomize-mac-addresses.sh
Last active July 25, 2022 06:24
In Ubuntu 16.04, randomize WiFi MAC addresses with a daily rotation - /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
#!/bin/sh
# /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# INSTALL
#
# > curl -L 'https://gist.github.com/paulfurley/46e0547ce5c5ea7eabeaef50dbacef3f/raw/56ee5dd5f40dec93b8f7438cbdeda5475ea3b5d2/randomize-mac-addresses.sh' |sudo tee /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# > sudo chmod +x /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# Configure every saved WiFi connection in NetworkManager with a spoofed MAC
@gaga5lala
gaga5lala / restore_docker_image_tag.sh
Created November 7, 2017 02:04
Restore docker image tag from text file.
# 1. Backup image tags to text file.
# $ docker images --format "{{.Repository}}:{{.Tag}} {{.ID}}" > img_id.txt
#
# 2. Execute clean-docker-for-mac script
# $ bash clean-docker-for-mac.sh $(docker images --format "{{.ID}}" | xargs)
#
# source: https://gist.github.com/MrTrustor/e690ba75cefe844086f5e7da909b35ce#file-clean-docker-for-mac-sh
#
# 3. Execute this script to restore tags from text file.
@haircut
haircut / System - Software Updates.mobileconfig
Created October 10, 2017 01:02
Manage macOS Software Update settings via configuration profile (Jamf Pro)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>com.apple.SoftwareUpdate</key>
@jganzabal
jganzabal / Nvidia Titan XP + MacBook Pro + Akitio Node + Tensorflow + Keras.md
Last active November 2, 2022 11:43
How to setup Nvidia Titan XP for deep learning on a MacBook Pro with Akitio Node + Tensorflow + Keras
@guycalledseven
guycalledseven / manual-uninstall-paragon-ntfs.sh
Last active April 27, 2024 09:00
Manually remove Paragon NTFS v15 leftovers MacOS
# after appcleaner does his magic, do this
sudo rm -rf "/Library/Application Support/Paragon Software/"
sudo rm /Library/LaunchDaemons/com.paragon-software.installer.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfs.loader.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfsd.plist
sudo rm /Library/LaunchAgents/com.paragon-software.ntfs.notification-agent.plist
sudo rm -rf /Library/Filesystems/ufsd_NTFS.fs/
sudo rm -rf /Library/PrivilegedHelperTools/com.paragon-software.installer
sudo rm -rf /Library/Extensions/ufsd_NTFS.kext/
@oshliaer
oshliaer / .how_to_concatenate_ranges_in_google_spreadsheets.md
Last active March 4, 2022 13:57
How to concatenate ranges in Google spreadsheets

How to concatenate ranges in Google spreadsheets

Unsplash

Sometimes it is necessary to concat ranges in Google Spreadsheet. Eg, Data 1 and Data 2

Sheet Data 1

Name Date Sum
Ethan 3/4/2017 31
@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active February 29, 2024 16:29
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

@alexislucena
alexislucena / uncommitLastCommit.md
Created November 14, 2016 08:56
Git: How to uncommit my last commit in git

To keep the changes from the commit you want to undo

$ git reset --soft HEAD^

To destroy the changes from the commit you want to undo

$ git reset --hard HEAD^

You can also say