Skip to content

Instantly share code, notes, and snippets.

@loa
loa / README.md
Last active June 14, 2024 11:08
Dual GPG Yubikey Setup

Dual GPG Yubikey Setup

If you follow this guide you will end up with an offline and online Yubikey. Use your online Yubikey for everyday life, signing/encryption etc. Offline key for signing keys for web-of-trust and replace lost online keys.

Awesome tools with PGP keys:

  • mozilla/sops dead-simple local encryption of sensitive files
  • popass.pw password manager for you and your team stored in git

Offline Yubikey

@atifazad
atifazad / sysquit_commands.md
Last active August 15, 2024 07:18
osascript commands to shutdown, restart, sleep and logout mac

Shut down without showing a confirmation dialog:

osascript -e 'tell app "System Events" to shut down'

Shut down after showing a confirmation dialog:

osascript -e 'tell app "loginwindow" to «event aevtrsdn»'
@EiNSTeiN-
EiNSTeiN- / Ubuntu 16.04 on a Surface Book.md
Last active April 20, 2017 02:08
My notes to get decent hardware support with Ubuntu 16.04 for my Surface Book
user=root
# disable dns server
port=0
# enable tftp server
enable-tftp
@salex89
salex89 / key_and_certificate_conversions.sh
Last active May 4, 2024 08:31
Different private/public key conversions GnuPG, OpenSSH and OpenSSL
# Source: http://www.sysmic.org/dotclear/index.php?post/2010/03/24/Convert-keys-betweens-GnuPG%2C-OpenSsh-and-OpenSSL
# OpenSSH private keys are directly understable by OpenSSL. You can test for example:
openssl rsa -in ~/.ssh/id_rsa -text
openssl dsa -in ~/.ssh/id_dsa -text
# So, you can directly use it to create a certification request:
openssl req -new -key ~/.ssh/id_dsa -out myid.csr
# You can also use your ssh key to create a sef-signed certificate:
@justin-schroeder
justin-schroeder / gist:d3ef404e80a7ae658a8d
Last active August 10, 2018 19:54
Installing X-Sendfile on Mac OS X Yosemitee

Installing mod_xsendfile on Mac OS X (Yosemite) [Update: El Capitan]

Update: El Capitan follows the same procedures, but you may have some difficulty with the compile/install, see the secation at the bottom for specific help with El Capitan

Installing mod_xsendfile for apache is atually quite simple, however I could find very little documentation out there. Here's my attempt to help out. In order to proceeed you'll need:

@miku
miku / README.md
Last active July 14, 2022 17:21
git --track vs --set-upstream vs --set-upstream-to

README

Short excursion into git --track, --set-upstream and --set-upstream-to.

All examples use the aliases co for checkout and br for branch.

Setup:

$ git clone [email protected]:AKSW/OntoWiki.git

@lstoll
lstoll / gist:7975423
Last active April 14, 2022 18:52
vmx options for OS X under VMWare
# These fields need to be in the vmx for OS X to function. You will probably need to delete the
# existing guestOS and ethernet0.virtualdev entries. You will also need to make sure the disk
# has been added as SCSI, and set as boot drive.
# You might also want to set a cron task as root in the VM to run:
# @reboot /usr/sbin/networksetup -detectnewhardware
# to make sure the VM configures networking
virtualHW.version = "9"
firmware="efi"
@mustafaturan
mustafaturan / latest-ffmpeg-centos6.sh
Last active October 25, 2022 20:14
Installs latest ffmpeg on Centos 6
# source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar xzvf yasm-1.2.0.tar.gz
cd yasm-1.2.0
@davidbalbert
davidbalbert / gist:6815258
Last active March 15, 2025 16:52
How to install custom SSL certificates on an ASUS RT-N66U running asuswrt-merlin
###########################################
# IMPORTANT NOTE:
#
# As of asuswrt-merlin 380.67 Beta, you
# can now configure SSL certificates from
# the Webui, making these instructions
# unnecessary.
###########################################