Skip to content

Instantly share code, notes, and snippets.

@elcheco
elcheco / after.sh
Last active August 31, 2022 10:57
Laravel Homestead - how to compile openssl on apple silicon m1 - arm64 - add this at the end of your after.sh file
#!/bin/bash
OPENSSL_VERSION=$(openssl version)
if [[ $OPENSSL_VERSION == *"OpenSSL 1.1.1m"* ]]; then
sudo DEBIAN_FRONTEND=noninteractive echo 'OpenSSL already compiled to the correct version' ;
else
cd /home/vagrant
mkdir build
mkdir build/openssl
wget https://www.openssl.org/source/openssl-1.1.1m.tar.gz
@OlfillasOdikno
OlfillasOdikno / Linux_GPU_PV.md
Last active July 6, 2024 18:05
Hyperv Linux Guest GPU PV

Hyperv Linux Guest GPU PV

  • Create VM
$isopath = <iso location>
$vhdpath = <vhdx location>
$vmpath = <vm path>
$vmname = "Arch-dxgkrnl"
New-VM -Name $vmname -MemoryStartupBytes 8GB -BootDevice VHD -NewVHDPath $vhdpath -Path $vmpath -NewVHDSizeBytes 20GB -Generation 2 -Switch "Default Switch"
(defun vulpea-project-p ()
"Return non-nil if current buffer has any todo entry.
TODO entries marked as done are ignored, meaning the this
function returns nil if current buffer contains only completed
tasks."
(seq-find ; (3)
(lambda (type)
(eq type 'todo))
(org-element-map ; (2)
@citruz
citruz / QEMU_ON_M1.md
Last active June 6, 2024 08:29
Create Ubuntu and Windows VMs with QEMU on Apple Silicon

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

@0xLeif
0xLeif / metal_01_swiftui.swift
Last active May 6, 2023 11:47
Metal + SwiftUI
//
// ContentView.swift
// MetalSwiftUI
//
// Created by Zach Eriksen on 9/8/20.
// Copyright © 2020 oneleif. All rights reserved.
//
// Inspired [MetalUI](https://github.com/0xLeif/MetalUI)
import SwiftUI
// Run any SwiftUI view as a Mac app.
import Cocoa
import SwiftUI
NSApplication.shared.run {
VStack {
Text("Hello, World")
.padding()
.background(Capsule().fill(Color.blue))
#!/usr/bin/env bash
# Author: Aeghn
# A script for buffer switching between emacs buffers, firefox tabs and other windows.
# dependences: jq i3 qutebrowser emacs
# set -eo pipefail
# QUTEBROWSER_SESSION_FILE="/tmp/qutebrowser_buffers_zsbd"
@leodutra
leodutra / -setup-windows-wsl-devenv.md
Last active July 8, 2024 10:13
Install and Setup Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

Setup Windows Subsystem 2 for Linux

Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

To setup native Linux, see this gist

Preview

Requirements

@hute37
hute37 / xvfb-xserverrc.sh
Last active February 27, 2024 14:01
Xvfb startup for nomachine headless (wayland) virtual desktop session
#!/bin/sh
##
# Xvfb headless startup
#
# #see: https://www.nomachine.com/AR10K00710
##
@corenel
corenel / README.md
Last active November 2, 2023 10:02
Install NVDEC and NVENC as GStreamer plugins

Install NVDEC and NVENC as GStreamer plugins

Environment

  • Ubuntu 18.04
  • NVIDIA driver 460.32.03
  • NVIDIA Video Codec SDK 11.0.10
  • GStreamer 1.14.5

Steps