Skip to content

Instantly share code, notes, and snippets.

@kelbyers
kelbyers / PSReadlineProfile.ps1
Created July 14, 2018 18:13
powershell to behave somewhat like bash
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
### shamelessly copied from https://raw.githubusercontent.com/lzybkr/PSReadLine/master/PSReadLine/SamplePSReadLineProfile.ps1
# This is an example profile for PSReadLine.
#
# This is roughly what I use so there is some emphasis on emacs bindings,
# but most of these bindings make sense in Windows mode as well.
@kelbyers
kelbyers / git-credential manager for windows with cygwin.txt
Last active October 5, 2020 21:31
git-credential manager for windows with cygwin
As of git version 2.28:
- you do not need to copy files anywhere, simply configuring `credential.helper` to `manager`
works if the credential manager is installed
- you do not need to install GCMW separately. It is an optional component with Git for Windows. It will be
installed by default with Git for Windows 2.29.
OBSOLETE:
From: https://github.com/Microsoft/Git-Credential-Manager-for-Windows/issues/146#issuecomment-211944606
@kelbyers
kelbyers / example command
Last active May 15, 2020 21:51
Boxstarter MonoDevelop
# install boxstarter
. { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
# run boxstarter with VisualStudio 2017 community gist (below)
$cred = Get-Credential IEUser ; Install-BoxstarterPackage -cred $cred `
-PackageName `
https://gist.githubusercontent.com/kelbyers/f6ef335bbe8ed556e079a527046a02da/raw/aafcb55077edb85f29cd6f3aaf172b80bc89ec1a/vscomdevelop.ps1
# run boxstarter with VBoxGuest additions and windows updates (next lines)
$cred = Get-Credential IEUser ; Install-BoxstarterPackage -cred $cred `
-PackageName `
@kelbyers
kelbyers / vagrant.log
Created January 2, 2020 19:02
vagrant output virtualbox 6.1
INFO global: Vagrant version: 2.2.6
INFO global: Ruby version: 2.4.9
INFO global: RubyGems version: 2.6.14.4
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/bin/vagrant"
WARN global: resolv replacement has not been enabled!
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/plugins/synced_folders/nfs/plugin.rb
@kelbyers
kelbyers / A.md
Last active May 15, 2019 02:12
bookmarklets
#!/bin/bash
# Uses a PID file to add daemon-like behavior to an arbitrary program.
################################################################################
# RHEL 6 doesn't include `realpath' in coreutils
function expandDir {
set +x
typeset DIR=$1
if [[ ! -d $DIR ]]; then
DIR=${1%/*}
@kelbyers
kelbyers / ssh-agent.sh
Last active October 10, 2015 17:17
bash startup script for cygwin, charade, pageant
#!/bin/bash
# NOTE: this is no longer necessary, the current version of charade works well with
# keychain, and the instructions on installing and using charade explain how to use
# them together by adding the following to your .bash_profile:
# eval `keychain -Q --eval`
# cygwin bash profile startup script, based off a post found here:
# http://russelldavis.blogspot.com/2011/02/using-charade-to-proxy-cygwin-ssh-agent.html
# Uses charade: https://github.com/wesleyd/charade
@kelbyers
kelbyers / mintty_here.reg
Created August 19, 2012 18:09
Regedit entries to start cygwin/mintty in a particular location from the Windows Explorer shell
REGEDIT4
[HKEY_CLASSES_ROOT\Directory\shell\mintty]
@="min&tty Here"
[HKEY_CLASSES_ROOT\Directory\shell\mintty\command]
@="C:\\cygwin\\bin\\mintty.exe -e /usr/bin/bash --login -c \"cd '%1'; exec /bin/bash -rcfile ~/.bashrc\""
[HKEY_CLASSES_ROOT\Drive\shell\mintty]
@="min&tty Here"
@kelbyers
kelbyers / f17_btrfs_ks.cfg
Created July 1, 2012 20:00
Fedora 17 Kickstart snippet to install with btrfs subvolumes
clearpart --all
part biosboot --fstype=biosboot --size=1
part swap --size=4096
part /boot --size=500
part btrfs.01 --size=500 --grow
btrfs none --label=system/ btrfs.01
btrfs / --subvol --name=@ LABEL=system/
btrfs /home --subvol --name=@home LABEL=system/