Skip to content

Instantly share code, notes, and snippets.

View xvzftube's full-sized avatar
💪
Yelling at a cloud

xvzf xvzftube

💪
Yelling at a cloud
View GitHub Profile
@xvzftube
xvzftube / init.vim
Last active December 3, 2023 19:37
my vimrc
" Plugins
call plug#begin('~/.vim/plugged')
Plug 'rakr/vim-one' " vim-one color theme
Plug 'scrooloose/nerdtree' " side bar file tree
Plug 'itchyny/lightline.vim' " minmal status bar
Plug 'tpope/vim-fugitive' " allows git commands in vim session
Plug 'airblade/vim-gitgutter' " shows git changes in gutter
Plug 'easymotion/vim-easymotion' " go to any word quickly '\\w', '\\e', '\\b'
Plug 'KKPMW/vim-sendtowindow' " send commands to REPL
Plug 'yuttie/comfortable-motion.vim' " scrolling 'C-d' or 'C-u'
#!/bin/sh
# License: GNU GPLv3
sudo apt-get update && sudo apt-get upgrade
# make a home for init.vim
mkdir -p dotfiles/nvim/.config/nvim/
wget -O dotfiles/nvim/.config/nvim/init.vim https://gist.githubusercontent.com/xvzftube/5380163d8fc9090796eb6fcc61fe022d/raw/176ef6d2691a8eb0c29d778b0971c8a331009781/init.vim
# add the key for the CRAN Ubuntu archives
sudo apt-key adv --keyserver keyserver.ubuntu.com -- recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
#!/bin/bash
jq '. as $in
| reduce (.[0] | keys_unsorted[]) as $k ( {};
.[$k] = ($in|map(.[$k] | (tonumber? // .))))'
@xvzftube
xvzftube / screencast_pulse.sh
Last active September 13, 2022 01:23
:television: screencast with ffmpeg
#! /bin/bash
# getting started
# ================
# - install pavucontrol and make sure default input is set to desired input
# - sudo apt install pavucontrol
# - mpv /dev/video0 is the webcam (most likely)
# - for HD change resolution with xrandr -d :0 -s 1280x720 or another
# youtube rec. resolution
# - If laptop is plugged into monitor and the excludsion of the laptop monitor is
# wanted then xrandr --output eDP-1 --off
# 1. Copy from beginning to -t time (seconds) or time (00:00:00)
ffmpeg -i file_name.mp4 \
-t 00:00:00 \
-c copy \
new_file_name_1.mp4
# 2. Copy from time -ss (00:00:00) to end
ffmpeg -i file_name.mp4 \
-ss 00:00:00 \
-c copy \
@xvzftube
xvzftube / vbox_guest.sh
Last active December 25, 2020 06:41
Virtualbox Guest additions
#!/bin/sh
# Devices -> Insert guest additions
sudo apt update
sudo apt install build-essential dkms linux-headers-$(uname -r)
sudo mkdir -p /mnt/cdrom
sudo mount /dev/cdrom /mnt/
cd /mnt
sudo ./VBoxLinuxAdditions.run --nox11
sudo shutdown -r now
@xvzftube
xvzftube / xmonad_setup.sh
Last active December 25, 2020 06:17
xmonad setup
# in debian session use the following commands then logout
sudo apt install xmonad libghc-xmonad-contrib-dev xterm dmenu
# get an xmonad.hs file
cd ~/.xmonad/ && wget http://code.haskell.org/xmonad/man/xmonad.hs && cd
cd /usr/share/fonts && sudo https://github.com/adobe-fonts/source-code-pro.git && cd && sudo fc-cache -fv
# install st and set font. If something goes wrong delete config.h and try again manually.
git clone https://git.suckless.org/st
cd st
sed -i '7 a static char *font = "Source Code Pro:pixelsize=18:antialias=true:autohint=true";' config.def.h
sed -i '9d' config.def.h
@xvzftube
xvzftube / dwm_setup.sh
Last active March 15, 2023 22:01
dwm setup
#!/bin/sh
# License: GNU GPLv3
sudo apt-get update && sudo apt-get upgrade -y
# assumes no desktop environment -- must install Xorg things
sudo apt-get --no-install-recommends install xserver-xorg xserver-xorg-video-fbdev \
xinit pciutils xinput xfonts-100dpi xfonts-75dpi xfonts-scalable libx11-dev libxft-dev libxinerama-dev xorg-dev -y
# install other common utils
sudo apt-get install build-essential curl neovim make tmux git python3-pip neofetch stow -y
@xvzftube
xvzftube / background_picker.sh
Last active January 1, 2021 14:47
Select wallpaper from sxiv and set as wallpaper
#!/bin/bash
sudo apt install xwallpaper
sudo apt install sxiv
git clone https://gist.github.com/85942af486eb79118467.git ~/wallpapers
# Enter to get into thumbnail mode
# Mark desired image with M
# Wallpaper will set when window closes
sxiv -r -q -o * | xargs xwallpaper --stretch
#!/bin/sh
# License: GNU GPLv3
sudo apt-get update && apt-get upgrade -y
# install other common utils
sudo apt-get install build-essential wget curl neovim make tmux git python3-pip neofetch stow -y
# R section inspired by https://cran.r-project.org/bin/linux/debian/
# R - dependencies necessary to add a new repository over HTTPS (CRAN GPG depends on these)
sudo apt-get install dirmngr apt-transport-https ca-certificates software-properties-common gnupg2