Skip to content

Instantly share code, notes, and snippets.

View rgunst's full-sized avatar

Ronald de Gunst rgunst

  • Rainforest Alliance
  • Leiden
View GitHub Profile
# Aliases
Set-Alias subl "C:\Program Files\Sublime Text 3\sublime_text.exe"
Set-Alias ie "C:\Program Files\Internet Explorer\iexplore.exe"
Set-Alias winscp "C:\Program Files (x86)\WinSCP\WinSCP.exe"
# Functions
function rdp { mstsc /control /v:$args }
function pssh { Enter-PSSession -Computername $args[0] -Credential etamgroep\dadmin8 }

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@rgunst
rgunst / deploy.rb
Last active August 29, 2015 14:20 — forked from christinedraper/deploy.rb
path = node['myapp']['path']
install_options = []
install_options << "--registry=#{node['myapp']['npm_registry']}" if (node['myapp']['npm_registry'])
# option is to prevent failure as pkgs are unauthenticated
package 'git' do
action :install
options "--allow-unauthenticated"
end
@rgunst
rgunst / gist:e682be4774c15ed1d97c
Created February 26, 2015 20:24
sudo for powershell
function elevate-process
{
$file, [string]$arguments = $args;
$psi = new-object System.Diagnostics.ProcessStartInfo $file;
$psi.Arguments = $arguments;
$psi.Verb = "runas";
$psi.WorkingDirectory = get-location;
[System.Diagnostics.Process]::Start($psi);
}