Skip to content

Instantly share code, notes, and snippets.

View johnsimcall's full-sized avatar

John Call johnsimcall

View GitHub Profile
@return1
return1 / trim_enabler.txt
Last active May 26, 2024 11:01
TRIM Enabler for OS X Yosemite 10.10.3
#
# UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs
# just run "sudo trimforce enable" to activate the trim support from now on!
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
@louiszuckerman
louiszuckerman / gfid-resolver.sh
Last active November 29, 2023 10:01
Glusterfs GFID Resolver Turns a GFID into a real path in the brick
#!/bin/bash
if [[ "$#" < "2" || "$#" > "3" ]]; then
cat <<END
Glusterfs GFID resolver -- turns a GFID into a real file path
Usage: $0 <brick-path> <gfid> [-q]
<brick-path> : the path to your glusterfs brick (required)
@infernix
infernix / vcsa-kvm.yml
Created February 10, 2016 19:23
Create a VMware VCSA appliance under KVM with libvirt and ansible
---
- name: Generate a KVM enabled VMWare VCSA VM under libvirt
hosts: 127.0.0.1
connection: local
vars:
- reqpkgs_apt:
- bsdtar
- libguestfs-tools
- qemu-utils
- virtinst
@fwilhe
fwilhe / gnome-custom-keybinding.sh
Last active November 16, 2019 15:20
Create custom key binding for GNOME to start an application
# Set Keybinding for GNOME Terminal in Slot 0
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name "GNOME Terminal"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command "gnome-terminal --maximize"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding "<Primary><Alt>t"
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"
# Print out all Slots
for i in `seq 0 9`;
do
@protrolium
protrolium / terminal-gif.md
Last active June 9, 2024 18:08
convert images to GIF in Terminal

Install ImageMagick

brew install ImageMagick

Pull specific region of frames from video file w/ ffmpeg

ffmpeg -ss 14:55 -i video.mkv -t 5 -s 480x270 -f image2 %04d.png

  • -ss 14:55 gives the timestamp where I want FFmpeg to start, as a duration string.
  • -t 5 says how much I want FFmpeg to decode, using the same duration syntax as for -ss.
  • -s 480x270 tells FFmpeg to resize the video output to 480 by 270 pixels.
  • -f image2 selects the output format, a series of still images — make sure there are leading zeros in filename.
@Informatic
Informatic / domain.xml
Last active July 3, 2024 18:08
How to use Windows 10 OEM license in libvirt VM (<smbios mode='host' /> does not work as Windows seems to verify UUID; apparmor/security configuration changes may be needed)
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<!-- ... -->
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/slic.bin'/>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/msdm.bin'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/some/path/smbios_type_0.bin'/>
<qemu:arg value='-smbios'/>

This the procedure for generating ignition configs for govcloud using th 4.3 installer (which actively thwarts attempts to do this)

Create install-config.yaml

apiVersion: v1
baseDomain: sjennings.me
# disconnected install requires local mirror
# oc adm release mirror
imageContentSources:
- mirrors:
@sky-joker
sky-joker / main.yml
Last active August 9, 2023 21:54
This playbook is an example of cloning a new VM with vmwre.vmware_res
---
- name: This playbook is an example of cloning a new VM with vmwre.vmware_res
hosts: localhost
gather_facts: false
vars:
vcenter_hostname: change me to vcenter host or ip
vcenter_username: administrator@vsphere.local
vcenter_password: change me to user password
folder: F0
template_vm: test_vm1
diff --git a/Dockerfile b/Dockerfile
index 5e32433..f746306 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -24,8 +24,17 @@ PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
RUN \
echo "**** install runtime packages ****" && \
apt-get update && \
+ apt-get install -y software-properties-common && \
+ add-apt-repository ppa:oibaf/graphics-drivers -y && \