Skip to content

Instantly share code, notes, and snippets.

@eggbean
eggbean / eza-wrapper.sh
Last active March 4, 2024 14:12
Now moving from exa to eza fork. Wrapper script to give it nearly identical switches and appearance to ls. Also automatically adds --git switch when in a git repository.
#!/bin/bash
## Change following to '0' for output to be like ls and '1' for eza features
# Don't list implied . and .. by default with -a
dot=0
# Show human readable file sizes by default
hru=1
# Show file sizes in decimal (1KB=1000 bytes) as opposed to binary units (1KiB=1024 bytes)
meb=0
# Don't show group column
@digitalsanity
digitalsanity / setup.sh
Created January 4, 2021 22:00 — forked from MakiseKurisu/setup.sh
Proxmox VE 6 GPU Passthrough
#!/bin/bash
# Reference guides:
# https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF
# https://pve.proxmox.com/wiki/Pci_passthrough
# https://pve.proxmox.com/wiki/Nested_Virtualization
# Remember to turn on SVM in BIOS and disable CSM
# Update packages
# IDA (disassembler) and Hex-Rays (decompiler) plugin for Apple AMX
#
# WIP research. (This was edited to add more info after someone posted it to
# Hacker News. Click "Revisions" to see full changes.)
#
# Copyright (c) 2020 dougallj
# Based on Python port of VMX intrinsics plugin:
# Copyright (c) 2019 w4kfu - Synacktiv
@elcodabra
elcodabra / [...slug].js
Created June 15, 2020 10:45
Next JS 9: Proxy middleware with api and next-connect
// [...slug].js
import nc from 'next-connect'
const dev = process.env.NODE_ENV !== 'production'
const handler = nc()
if (dev) {
const { createProxyMiddleware } = require('http-proxy-middleware')
handler.use(createProxyMiddleware({
@MakiseKurisu
MakiseKurisu / setup.sh
Last active December 12, 2023 15:53
Proxmox VE 6 GPU Passthrough
#!/bin/bash
# Reference guides:
# https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF
# https://pve.proxmox.com/wiki/Pci_passthrough
# https://pve.proxmox.com/wiki/Nested_Virtualization
# Remember to turn on SVM in BIOS and disable CSM
# Update packages
#####################
# clinet: filebeat
#####################
$cat /etc/filebeat/filebeat.yml
filebeat:
prospectors:
-
paths:
- /apphome/MetaData/log/*
@Miouyouyou
Miouyouyou / Linux_DRM_OpenGLES.c
Last active April 18, 2024 07:34
An example, inspired by Rob Clark "kmscube.c" that uses Linux Direct Rendering Manager ( DRM ) and EGL to create an OpenGL ES 2 context. This is a standalone example, that just clears the screen with a blueish color. Usable with Rockchip DRM drivers and Mali Wayland/DRM userspace drivers.
// gcc -o drmgl Linux_DRM_OpenGLES.c `pkg-config --cflags --libs libdrm` -lgbm -lEGL -lGLESv2
/*
* Copyright (c) 2012 Arvin Schnell <arvin.schnell@gmail.com>
* Copyright (c) 2012 Rob Clark <rob@ti.com>
* Copyright (c) 2017 Miouyouyou <Myy> <myy@miouyouyou.fr>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
@BichengLUO
BichengLUO / NoiseAndGrain.cs
Created June 7, 2016 08:34
Add noise and grain to Unity3D camera
using System;
using UnityEngine;
using Random = UnityEngine.Random;
namespace UnityStandardAssets.ImageEffects
{
[ExecuteInEditMode]
[RequireComponent (typeof(Camera))]
[AddComponentMenu ("Image Effects/Noise/Noise And Grain (Filmic)")]
public class NoiseAndGrain : PostEffectsBase
@joglomedia
joglomedia / mautic.dev.conf (Mautic Nginx Configuration)
Last active January 26, 2021 06:16
Mautic Nginx Config (Install using Simple LNMP Installer - https://github.com/joglomedia/deploy) - Open Source Marketing Automation
server {
listen 80;
#listen [::]:80 default_server ipv6only=on;
## Make site accessible from world web.
server_name mautic.dev www.mautic.dev *.mautic.dev;
## Log Settings.
access_log /var/log/nginx/mautic.dev_access.log;
error_log /var/log/nginx/mautic.dev_error.log error;
using UnityEngine;
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
public class LSystemGenerator : MonoBehaviour
{
[Serializable]