Skip to content

Instantly share code, notes, and snippets.

View jfturcot's full-sized avatar

J.F. Turcot jfturcot

View GitHub Profile
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
#!/usr/bin/env bash
export VGA_DEVICE=0000:0b:00.0
echo "unbinding, resetting and rebinding $VGA_DEVICE" > /dev/kmsg 2>&1
echo $VGA_DEVICE > /sys/bus/pci/devices/$VGA_DEVICE/driver/unbind
/root/reset-test $VGA_DEVICE
echo $VGA_DEVICE > /sys/bus/pci/drivers/vfio-pci/bind
echo "sucessfully unbound, reset and rebound $VGA_DEVICE" > /dev/kmsg 2>&1
@ayyybe
ayyybe / ccdl.command
Last active July 20, 2024 12:50
Adobe Offline Package Builder v0.1.2 (macOS only) --- No longer being maintained.
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@AnatomicJC
AnatomicJC / zfs-docker.md
Last active December 14, 2023 00:33
ZFS and Docker

Create a dedicated ZFS docker pool with deduplication disabled in case of dedup enabled on your system:

zfs create -o mountpoint=/var/lib/docker -o dedup=off rpool/docker

Sometimes, you don't want ZFS for docker storage. ZFS can be sadly quite painful with Docker in Docker and similar scenarios. It might be best to avoid the problem by creating a volume in your ZFS pool, formatting that volume to ext4, and having docker use "overlay2" on top of that, instead of "zfs".

zfs create -s -V 30G rpool/docker

mkfs.ext4 /dev/zvol/rpool/docker

@pjobson
pjobson / pike_it.md
Last active March 14, 2024 01:56
Asus Pike 2008 IT Mode Cross Flash

Flashing Asus 2008 PIKE to IT Mode

Used on an Asus Z8PE-D18 board with no EFI boot options. These instructions were written using Linux Mint to create the media, most distributions will work with little modification.

The PIKE 2008 is basically a LSI 9220-8i which you can flash with 9211-8i firmware. Flashing to IT mode allows you to have direct access to the disks to use btrfs or zfs or some kind of software RAID instead of the card's RAID.

Get Your SAS Address

There is a sticker on the back of your PIKE card which has 16 digits starting with 5000. Write this address down or take a picture of it. Note I put XXXXXXXXXXXX in this picture as these numbers are unique to the card. If your card does not have this sticker, instructions will be provided below.

_git_url=https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git
_git_branch=roc-2.0.x
pkgname=rocm-opencl-git
pkgver=2.0.r0.184c0ef
pkgrel=1
pkgdesc="ROCm OpenCL™ Compatible Runtime"
arch=('x86_64')
url="https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime"
license=('MIT')
@wangruohui
wangruohui / intel-nvidia.md
Last active July 17, 2024 00:58
Intel for display, Nvidia for computing

Intel for display, NVIDIA for computing

This guide will show you how to use Intel graphics for rendering display and NVIDIA graphics for CUDA computing on Ubuntu 18.04 / 20.04 desktop.

I made this work on an ordinary gaming PC with two graphics devices, an Intel UHD Graphics 630 plus an NVIDIA GeForce GTX 1080 Ti. Both of them can be shown via lspci | grep VGA.

00:02.0 VGA compatible controller: Intel Corporation Device 3e92
01:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active June 29, 2024 01:12
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@jackz314
jackz314 / SetEditTextCursorColor.java
Last active June 9, 2020 04:14
A reflection method used to set EditText Cursor Color with support for Android P (API 28)
//StackOverflow solution by me here: https://stackoverflow.com/a/52564925/8170714
public static void setEditTextCursorColor(EditText editText, int color) {
try {
// Get the cursor resource id
Field field = TextView.class.getDeclaredField("mCursorDrawableRes");
field.setAccessible(true);
int drawableResId = field.getInt(editText);
// Get the editor
@numinit
numinit / 0-index.md
Last active April 6, 2024 21:54
patch -p0 < fix-vega-reset.patch