Skip to content

Instantly share code, notes, and snippets.

@chadr
chadr / ms-dos_win.txt
Created March 22, 2021 03:03
MS-DOS & Win Config File Stuff
config.sys
----------
DEVICE=C:\windows\HIMEM.SYS /testmem:off
DEVICE=C:\WINDOWS\EMM386.EXE RAM I=B000-B7FF D=256 AUTO
DOS=HIGH,UMB
autoexec.bat
------------
SMARTDRV 2048 16 A+ C+ D /Q /B:8192 /E:32768
SET PROMPT=MS-DOS Mode!$_$P$G
@chadr
chadr / choco.txt
Last active February 12, 2021 15:22
Chocolatey Init + Apps
#Requires -RunAsAdministrator
Set-ExecutionPolicy Bypass -Scope Process -Force
# install chocolatey if not installed
if (!(Test-Path -Path "$env:ProgramData\Chocolatey")) {
Invoke-Expression((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
}
@chadr
chadr / ntfs_overhead.txt
Last active February 12, 2021 15:19
Lower NTFS overhead for VMs
rem increase ntfs mtz size
fsutil behavior set mftzone 2
rem disable last access time on all files
fsutil behavior set disablelastaccess 1
rem http://archive.oreilly.com/cs/user/view/cs_msg/95219 (some installers need 8dot3 filenames)
rem disable 8dot3 filenames
ram Warning: Some applications such as incremental backup utilities rely on this update information and do not function correctly without it.
fsutil behavior set disable8dot3 1
@chadr
chadr / bs_test.txt
Last active February 6, 2021 19:57
Test Boxstarter Script
Disable-MicrosoftUpdate
Disable-UAC
Disable-BingSearch
Disable-GameBarTips
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions -EnableShowRibbon
Set-BoxstarterTaskbarOptions -AlwaysShowIconsOn
Install-Windowsupdate -getUpdatesFromMS -acceptEula -criteria IsInstalled=0
@chadr
chadr / desktop-prep.sh
Last active February 7, 2021 04:07
desktop ubuntu setup
#!/bin/bash
# quick and dirty script to get Ubuntu 20.04 LTS Desktop up to speed
# requires sudo
SUDO=''
if [ "$UID" -ne 0 ]; then
SUDO='sudo'
fi
# packages
@chadr
chadr / vif_fun.r
Created September 15, 2018 14:02 — forked from fawda123/vif_fun.r
vif_func<-function(in_frame,thresh=10,trace=T,...){
library(fmsb)
if(any(!'data.frame' %in% class(in_frame))) in_frame<-data.frame(in_frame)
#get initial vif value for all comparisons of variables
vif_init<-NULL
var_names <- names(in_frame)
for(val in var_names){
# ipak function: install and load multiple R packages.
# check to see if packages are installed. Install them if they are not, then load them into the R session.
ipak <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg))
install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}
@chadr
chadr / gist:d03165706d40f4cad2cd
Created May 5, 2014 21:06
How to mislead with histograms.
x <- c(1.03, 1.24, 1.47, 1.52, 1.92, 1.93, 1.94, 1.95, 1.96, 1.97, 1.98,
1.99, 2.72, 2.75, 2.78, 2.81, 2.84, 2.87, 2.9, 2.93, 2.96, 2.99, 3.6,
3.64, 3.66, 3.72, 3.77, 3.88, 3.91, 4.14, 4.54, 4.77, 4.81, 5.62)
# Bin Width 0.8
hist(x, breaks=seq(0.3, 6.7, by=0.8), xlim=c(0, 6.7), col="green3", freq=FALSE)
# Bin Width 1.0
hist(x, breaks=0:8, col="aquamarine", freq=FALSE)

Keybase proof

I hereby claim:

  • I am chadr on github.
  • I am chadross (https://keybase.io/chadross) on keybase.
  • I have a public key whose fingerprint is F927 D3A5 6804 B1CC 47B3 0CB6 8F7D 61B8 1FD9 E020

To claim this, I am signing this object: