Skip to content

Instantly share code, notes, and snippets.

View badstreff's full-sized avatar
🏠
Working from home

Adam Furbee badstreff

🏠
Working from home
View GitHub Profile
let win_shell = (has('win32') || has('win64')) && &shellcmdflag =~ '/'
" if not on windows enable python2 and python3 support
if !win_shell
set pythonhome=$HOME/.pyenv/versions/2.7.11
set pythondll=$HOME/.pyenv/versions/2.7.11/lib/libpython2.7.dylib
set pythonthreehome=$HOME/.pyenv/versions/3.6.0
set pythonthreedll=$HOME/.pyenv/versions/3.6.0/lib/libpython3.6m.dylib
let g:python2_host_prog = '/usr/local/bin/python'
let g:python3_host_prog = '/usr/local/bin/python3'
" Press ? for help
.. (up a dir)
/Users/ajf023/
▸ Applications/ -> /Volumes/Storage/Profile/Applications/
▸ Desktop/ -> /Volumes/Storage/Profile/Desktop/
▸ Documents/ -> /Volumes/Storage/Profile/Documents/
▸ Downloads/ -> /Volumes/Storage/Profile/Downloads/
▸ Library/
▸ Movies/
" Press ? for help
.. (up a dir)
</Storage/Projects/jss/tools/
▸ __pycache__/
add_printer_policies.py*
ansible.cfg
clear_disabled_patches.py*
group_cleanup.py*
inventory.py*
let win_shell = (has('win32') || has('win64')) && &shellcmdflag =~ '/'
if !win_shell
set pythonhome=$HOME/.pyenv/versions/2.7.11
set pythondll=$HOME/.pyenv/versions/2.7.11/lib/libpython2.7.dylib
set pythonthreehome=$HOME/.pyenv/versions/3.6.0
set pythonthreedll=$HOME/.pyenv/versions/3.6.0/lib/libpython3.6m.dylib
let g:python2_host_prog = '/usr/local/bin/python'
let g:python3_host_prog = '/usr/local/bin/python3'
endif
@badstreff
badstreff / csrandom.py
Last active December 4, 2022 22:40
Partial Python Implementation of C#'s Random Class
from ctypes import *
# implemented from:
# http://referencesource.microsoft.com/#mscorlib/system/random.cs,dec894a7e816e665
class Random(object):
def __init__(self, seed):
self.seed = c_int(seed).value
self.MBIG = 2147483647
self.MMIN = -2147483648
self.MZ = 0
self.MSEED = 161803398
@badstreff
badstreff / safari.mobileconfig
Created April 10, 2017 19:00
Quick profile showing how to force homepage in safari for sierra
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadIdentifier</key>
<string>edu.shsu.profile.safari</string>
<key>PayloadRemovalDisallowed</key>
<true/>
<key>PayloadScope</key>
<string>System</string>
" quick hack to make sure we start out with python3 regardless of what plugins
" may set
if exists('py2') && has('python')
elseif has('python3')
endif
let g:python2_host_prog = '/usr/local/bin/python'
let g:python3_host_prog = '/usr/local/bin/python3'
set nocompatible " be iMproved, required
if exists('py2') && has('python')
elseif has('python3')
endif
let g:python2_host_prog = '/usr/local/bin/python'
let g:python3_host_prog = '/usr/local/bin/python3'
set nocompatible " be iMproved, required
filetype off " required
if exists('py2') && has('python')
elseif has('python3')
endif
let g:python2_host_prog = '/usr/local/bin/python'
let g:python3_host_prog = '/usr/local/bin/python3'
set nocompatible " be iMproved, required
filetype off " required
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).