Skip to content

Instantly share code, notes, and snippets.

petrsnd /
Last active Feb 19, 2018
Download all LDS Bible Videos chronologically
# petrsnd
# Download all LDS Bible Videos chronologically
# Be sure to select your desired resolution by changing the variable below:
# As of 2017-05-08 this script was able to download all of the Bible Videos from the
petrsnd / .bash_profile
Last active Apr 28, 2017
Linux .bash_profile and .bashrc
View .bash_profile
source $HOME/.bashrc
set -o vi
# setup Lynx
export WWW_HOME=
# setup PATH
export PATH=$HOME/scripts:$PATH
petrsnd / .tmux.conf
Last active Oct 6, 2017
tmux.conf based on spiceycode's
View .tmux.conf
# Based on:
set-option -g default-shell "/bin/bash"
# 1,2,3 is more natural for fingers than 0,1,2
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
petrsnd / Xfce4-DarkPastels.itermcolors
Created Sep 17, 2016
iTerm2 Dark-Pastels Console Colors
View Xfce4-DarkPastels.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<key>Ansi 0 Color</key>
<key>Blue Component</key>
<key>Green Component</key>
petrsnd / vimrc
Created Sep 14, 2016
VIM resource file
View vimrc
" Configuration file for vim
set modelines=0 " CVE-2007-2438
" Normally we use vim-extensions. If you want true vi-compatibility
" remove change the following statements
set nocompatible " Use Vim defaults instead of 100% vi compatibility
set backspace=2 " more powerful backspacing
syntax on " syntax highlighting
petrsnd / pastels-dark.reg
Created Aug 19, 2016
Dark-Pastels Console Colors
View pastels-dark.reg
Windows Registry Editor Version 5.00
; Registry file that maps the pastels palette to the 16 avaliable colors
; in a Windows command prompt. Note, hex values in the table are RGB but byte
; ordering of a DWORD is BGR, e.g. "ColorTable<##>"=dword:00<B><G><R>
; Pastels color table from xfce4-terminal settings.
; NR cmd.exe PowerShell PASTELS HEX DWORD
; -- ------- ----------- ------------ ------- --------

Keybase proof

I hereby claim:

  • I am petrsnd on github.
  • I am petrsnd ( on keybase.
  • I have a public key whose fingerprint is A3F2 F824 8B3C 885A 5B78 98A5 6981 C173 677D C61B

To claim this, I am signing this object:

View Microsoft.PowerShell_profile.ps1
- Sublime Text 3
- VIM 7.4
- GitHub for Windows
I highly recommend ConEmu for use with Powershell.
I install ConEmu using Chocolatey and then change my start screen links to point to
ConEmu, Target="C:\Program Files\ConEmu\ConEmu64.exe" /font "Consolas" /size 16 /bufferheight 9999 /cmd powershell
petrsnd / SetOwner.cpp
Created Jul 29, 2014
SetOwner demonstrating that I cannot change the file owner on disk.
View SetOwner.cpp
#include <Windows.h>
#include <AclAPI.h>
#include <Sddl.h>
#include <stdio.h>
SetPrivilege(HANDLE hToken, LPCTSTR lpszPrivilege, BOOL bEnablePrivilege) {
TOKEN_PRIVILEGES newState = { 0 };
LUID luid;