Skip to content

Instantly share code, notes, and snippets.

@kaapstorm
kaapstorm / gpu_passthrough_on_trillian.rst
Last active November 5, 2023 20:34
How to configure GPU passthrough, specifically for my desktop machine, trillian

GPU Passthrough on trillian

Prepare the host

Configure primary GPU

Check that the integrated GPU is the primary GPU.

@darrenpmeyer
darrenpmeyer / open-vm-tools-vmware-ubuntu-sharing.md
Last active April 10, 2024 19:18
open-vm-tools and VMWare Shared Folders for Ubuntu guests

(NB: adapted from this Ask Ubuntu thread -- tested to work on Ubuntu 16.04 LTS through Ubuntu 22.04 LTS (Jammy).

Unlike using VMWare Tools to enable Linux guest capabilities, the open-vm-tools package doesn't auto-mount shared VMWare folders. This can be frustrating in various ways, but there's an easy fix.

TL;DR

Install open-vm-tools and run:

sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
@hww
hww / install-gentoo-zfs-root.txt
Last active September 6, 2023 21:40
Install gentoo ZFS root
#
# Boot Linux Live CD with ZFS support
# fearedbliss maintains a variant of System Rescue CD that is highly recommended:
# https://wiki.gentoo.org/wiki/User:Fearedbliss
# Instruction for a USB key version
# http://www.sysresccd.org/Sysresccd-manual-en_How_to_install_SystemRescueCd_on_an_USB-stick
# To use ssh
# ssh -fN -R localhost:10099:localhost:22 name@server
@ingramchen
ingramchen / gist:e2af352bf8b40bb88890fba4f47eccd0
Created April 5, 2016 12:58
ffmpeg convert gif to mp4, for best cross browser compatibility
### Full command line options
```
ffmpeg -f gif -i FOO.gif -pix_fmt yuv420p -c:v libx264 -movflags +faststart -filter:v crop='floor(in_w/2)*2:floor(in_h/2)*2' BAR.mp4
```
### Notie
* output mp4 is encoded with h264, support Firefox/Chrome/Safari in Windows, Mac OSX, Android, and iOS.
@yangchenyun
yangchenyun / fetch_kindle.js
Last active February 19, 2023 10:10
Get back my books from Kindle
/*
* @fileoverview Program to free the content in kindle books as plain HTML.
*
* This is largely based on reverse engineering kindle cloud app
* (https://read.amazon.com) to read book data from webSQL.
*
* Access to kindle library is required to download this book.
*/
// The Kindle Compression Module copied from http://read.amazon.com application
@gbaman
gbaman / HowToOTG.md
Last active May 2, 2024 01:27
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

@killercup
killercup / Readme.md
Last active August 26, 2023 23:14
Convert The Rust Programming Language to Epub
@rubo77
rubo77 / ignorelist
Last active February 22, 2021 14:39
This ignorelist can be used to backup your home folder without useless folders and files, see http://askubuntu.com/a/545676/34298
# rsync-homedir-excludes
#
# A list of files to exclude when backing up *nix home directories using rsync.
#
# Author: Ruben Barkow <https://gist.github.com/rubo77> (original)
# Version: 2015-08-30
# Website: https://gist.github.com/rubo77/8ffaadbc58ab099d2bc3
# the repository has moved to github

How to inform Eclipse and other Mac applications of the command line PATH

  1. Update Mac OS X's notion of PATH.
$ defaults write ~/.MacOSX/environment PATH "`echo $PATH`"
$ echo "setenv PATH $PATH" | sudo tee /etc/launchd.conf
  1. Restart Mac OS X.
@aras-p
aras-p / preprocessor_fun.h
Last active April 28, 2024 15:25
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,