Skip to content

Instantly share code, notes, and snippets.

View junkdeck's full-sized avatar
🤠
y e e h a w

Fred junkdeck

🤠
y e e h a w
  • salacious city
View GitHub Profile
@junkdeck
junkdeck / affine.py
Created January 11, 2021 11:21 — forked from lampysprites/affine.py
Screen space affine texture mapping in Blender
import bpy
import bmesh
# THIS SCRIPT WILL RENDER THE ANIMATION USING THE SCENE'S OUTPUT SETTINGS
# DURING THE RENDER BLENDER WILL APPEAR TO FREEZE
# TO SEE THE EFFECT, SET UP MATERIAL TEXTURES LIKE THIS:
#+-------------+ +------------------+ +-----------------+
#|UV MAP | |SEPARATE XYZ | |DIVIDE |
#| UV *|-----| X *|----------|* Value Value *|\
@junkdeck
junkdeck / gist:5b13ea05d4b47e746480d83db7d99a04
Created June 3, 2020 09:56
PulseAudio sane headphone/lineout switching
Having both speakers and headphones plugged in and switching in software on-the-fly
By design, Pulseaudio automatically turns off Line Out when headphones are plugged in and uses Headphone slider instead. You can observe this behavior in alsamixer. What we want is to have Headphone and Line Out sliders working separately and at the same time. This is extremely useful if you want to remap Realtek's jacks to have, say, Rear Green for headphones and Blue for speakers (with the help of hdajackretask from alsa-tools).
To achieve this, you should directly edit Pulseaudio mixer's configuration.
1. We tell pulseaudio that headphones are always plugged in.
Edit:
/usr/share/pulseaudio/alsa-mixer/paths/analog-output-lineout.conf
@junkdeck
junkdeck / .zshrc
Created November 27, 2019 09:16
.zshrc
# disable software flow control
stty -ixon
# The following lines were added by compinstall
zstyle ':completion:*' completer _expand _complete _ignored _approximate
zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*'
zstyle ':completion:*' menu select
zstyle :compinstall filename '/home/fred/.zshrc'
autoload -Uz compinit
@junkdeck
junkdeck / .Xresources
Created March 30, 2018 14:24
.Xresources (for urxvt)
!!!--- urxvt settings
!!!--- loginshell, for ruby / rvm
URxvt*.loginShell: true
!!!--- Font and general settings
URxvt*.font: xft:terminus:size=11
URxvt*.geometry: 80x32
URxvt*.buffered: true
@junkdeck
junkdeck / .vimrc
Last active May 2, 2018 09:53
vim dotfile
" disable vi compatibility
set nocompatible
" == VUNDLE SETUP ==
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let vundle manage Vundle