Skip to content

Instantly share code, notes, and snippets.

View firestack's full-sized avatar
:accessibility:

Kayla Firestack firestack

:accessibility:
View GitHub Profile
@ivan
ivan / fix-vscode-server-binaries.nix
Last active May 29, 2022 00:54
Fix vscode server for NixOS
# Based on https://gist.github.com/sonowz/d70b03177c344f4bbbc674de5e5bb937
with import <nixpkgs> {};
let
pname = "fix-vscode-server-binaries";
script = pkgs.writeShellScriptBin pname ''
set -eu -o pipefail
SCRIPT_DIR="$(dirname -- "$(readlink -f -- "$0")")"
@Madouura
Madouura / bcachefsEncrypted.nix
Created May 31, 2022 07:26
nixpkgs installer.nix bcachefsEncrypted test
bcachefsEncrypted = makeInstallerTest "bcachefs-encrypted" {
extraInstallerConfig = {
boot.supportedFilesystems = [ "bcachefs" ];
environment.systemPackages = with pkgs; [ keyutils ];
};
# We don't want to use the normal way of unlocking bcachefs defined in tasks/filesystems/bcachefs.nix.
# So, override initrd.postDeviceCommands completely and simply unlock with the predefined password.
extraConfig = ''
boot.initrd.postDeviceCommands = lib.mkForce "echo password | bcachefs unlock /dev/vda3";
@darktable
darktable / ProjectAssetPostprocessor.cs
Created April 20, 2012 03:37 — forked from hoesing/ProjectAssetPostprocessor.cs
Unity asset pre/postprocessor for applying asset defaults by path.
// Drop this script in the Editor directory in your project (creating the Editor directory if it's not there yet)
// Then re-import the assets in the directories covered by this script (right click and reimport)
//
// I would replace my path checking with the path checking from this gist:
// https://gist.github.com/1842177
//
// The texture settings for icons might want to use some of his settings combined with mine as well
using UnityEngine;
@Geri-Borbas
Geri-Borbas / AllEditorAssetNames.txt
Last active January 11, 2023 03:06
Asset names in the Unity Editor Asset Bundle. More at http://eppz.eu/blog/unity-editor-icon-assets/
avatar/arrow.fbx, arrow, UnityEngine.GameObject
avatar/defaultavatar.fbx, DefaultAvatar, UnityEngine.GameObject
avatar/defaultgeneric.fbx, DefaultGeneric, UnityEngine.GameObject
avatar/dial_flat.prefab, dial_flat, UnityEngine.GameObject
avatar/dude.fbm/body normal.tga, body normal, UnityEngine.Texture2D
avatar/dude.fbm/body_color_map.tga, body_color_map, UnityEngine.Texture2D
avatar/dude.fbm/body_specular_map.tga, body_specular_map, UnityEngine.Texture2D
avatar/dude.fbm/eyes_color_map.tga, eyes_color_map, UnityEngine.Texture2D
avatar/dude.fbm/eyes_specular_map.tga, eyes_specular_map, UnityEngine.Texture2D
avatar/dude.fbm/face normal.tga, face normal, UnityEngine.Texture2D
@sinbad
sinbad / StevesEaseMath.cpp
Last active March 31, 2023 11:41
Easing functions from easings.net implemented for Unreal Engine
#include "StevesEaseMath.h"
float UStevesEaseMath::EaseAlpha(float InAlpha, EStevesEaseFunction Func)
{
constexpr float BackC1 = 1.70158f;
constexpr float BackC2 = BackC1 * 1.525f;
constexpr float BackC3 = BackC1 + 1.f;
constexpr float ElasticC4 = UE_TWO_PI / 3.f;
constexpr float ElasticC5 = UE_TWO_PI / 4.5;
@pmarreck
pmarreck / hendricks_formatter.ex
Created July 25, 2023 14:02
An Elixir formatting module for `mix format` that converts leading spaces to tabs.
defmodule HendricksFormatter do
@moduledoc """
This module is a formatter plugin for Elixir's `mix format` task
that converts leading whitespace to tabs.
It tries to intelligently determine the tab width based on the most common
counts of leading space runs in the file.
It allows additional space characters for minor adjustments that are below the tab width.
OK, why tabs? Why resurrect this age-old nerd debate again?
Very simple: It's an accessibility issue:
https://adamtuttle.codes/blog/2021/tabs-vs-spaces-its-an-accessibility-issue/
@roberth
roberth / minimod.nix
Last active December 29, 2023 07:47
Simple and quick module system alternative + thoughts and tasks
/*
minimod: A stripped down module system
TODO Comparison:
- [ ] Come up with a benchmark "logic" using plain old functions and let bindings
- [ ] Write the benchmark for the module system
- [ ] Write the benchmark for POP?
- [ ] Qualitative comparison of extensibility in the context of composable
Nixpkgs packaging logic
TODO Fine-tuning:
@AngryAnt
AngryAnt / DualDisplay.cs
Last active January 24, 2024 08:26
Example use of the Unity 4.1 AirPlay API - gives a setup with the iOS device as controller of the remote display.
using UnityEngine;
using System.Collections;
/*
Runtime use:
To be available, AirPlay needs to be switched on for the device either via a native AirPlay UI component or
via the global AirPlay mirroring setting. Your options are:
A: Modify your Xcode project to layer a native AirPlay Cocoa control somewhere over your Unity content.
@kosua20
kosua20 / gist:0c506b81b3812ac900048059d2383126
Created March 18, 2017 18:35
NVIDIA FXAA 3.11 by TIMOTHY LOTTES
/*============================================================================
NVIDIA FXAA 3.11 by TIMOTHY LOTTES
------------------------------------------------------------------------------
COPYRIGHT (C) 2010, 2011 NVIDIA CORPORATION. ALL RIGHTS RESERVED.
------------------------------------------------------------------------------
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'