Skip to content

Instantly share code, notes, and snippets.

"disable compatibility mode with Vi
set nocompatible
filetype off
"set rtp+=~/vimfiles/bundle/Vundle.vim
"call vundle#begin('~/vimfiles/bundle')
"Plugin 'VundleVim/Vundle.vim'
@Maximus5
Maximus5 / get-admin.bat
Last active March 18, 2024 17:28
Sample batch to run itself elevated
@echo off
echo Checking for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
echo Permission check result: %errorlevel%
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...

Vim, Vundle and ConEmu on Windows

Let's start by getting it out on the table: Sublime Text is great, and version 3 should no longer be considered "abandonware" as of build 3065. Sublime Text served me very, very well over the years. That said, trying out new things is a major part of leveling-up, and in that vein Vim deserves a go. (And have you seen some of those thoughtbot guys flying around in Vim? It's awesome!)

Getting Vim up-and-running on your Windows machine doesn't have to be an all-day project. In this post, we'll walk through:

  • Installing gVim, which gives us both the "classic" command line version as well as the graphical version
  • Installing Vundle, the best way to handle Vim-enhancing packages
  • Installing ConEmu, a supercharged command line emulator for Windows
@Maximus5
Maximus5 / csp.hang.log
Created June 19, 2015 14:11
scp hangs after uploading new file to sourceforge
> scp.exe -i %home%\.ssh\id_dsa_sf file.7z conemumaximus,conemu@frs.sourceforge.net:/home/frs/project/c/co/conemu/temp/
Executing: program /usr/bin/ssh host frs.sourceforge.net, user conemumaximus,conemu, command scp -v -t /home/frs/project/c/co/conemu/temp/
OpenSSH_6.7p1, OpenSSL 1.0.2c 12 Jun 2015
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to frs.sourceforge.net [216.34.181.57] port 22.
debug1: Connection established.
debug1: identity file ***********\\id_dsa_sf type 2
debug1: key_load_public: No such file or directory
debug1: identity file ***********\\id_dsa_sf-cert type -1
@Maximus5
Maximus5 / README.md
Last active August 29, 2015 14:17 — forked from fnichol/README.md

Why?

There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.

From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?

Installation

The Ruby Way! (Fun)

@Maximus5
Maximus5 / gist:2e83699883922f687874
Created January 23, 2015 08:52
Samle ConEmu's quake configuration
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2015-01-23 11:49:31" build="150119">
<value name="SingleInstance" type="hex" data="00"/>
<value name="KeyboardHooks" type="hex" data="01"/>
<value name="UseInjects" type="hex" data="01"/>
<value name="Update.CheckOnStartup" type="hex" data="00"/>
<value name="Update.CheckHourly" type="hex" data="00"/>
<value name="Update.ConfirmDownload" type="hex" data="01"/>
@Maximus5
Maximus5 / git.lua
Last active August 29, 2015 14:13 — forked from mikesigs/git.lua
---
-- This file is intended to be used with cmder
-- http://bliker.github.io/cmder/
--
-- Replace your existing <path_to_cmder>\config\git.lua with this file
-- This will append the branch status to your prompt, e.g. [ahead 1, behind 2]
-- It basically takes the output of git status -sb and appends it (with coloring) to the cmder prompt (before the lambda)
---
---
@Maximus5
Maximus5 / -README.md
Last active August 29, 2015 14:13 — forked from jirutka/-README.md

How to use terminal on Windows without going crazy…

Windows is really horrible system for developers and especially for devops. It doesn’t even have a usable terminal and shell, so working with command line is really pain in the ass. If you really don’t want to switch to any usable system (OS X, Linux, BSD…), then this guide should help you to setup somewhat reasonable environment – usable terminal, proper shell, ssh client, git and Sublime Text as a default editor for shell.

Install stuff

  1. Download and install Git for Windows* with:
    • [✘] Use Git from the Windows Command Prompt
  • [✘] Checkout as-is, commit Unix-style line endings
<value name="ColorTable00" type="dword" data="00181818"/>
<value name="ColorTable01" type="dword" data="00c2af7c"/>
<value name="ColorTable02" type="dword" data="006cb5a1"/>
<value name="ColorTable03" type="dword" data="00b9c186"/>
<value name="ColorTable04" type="dword" data="004246ab"/>
<value name="ColorTable05" type="dword" data="00af8bba"/>
<value name="ColorTable06" type="dword" data="0088caf7"/>
<value name="ColorTable07" type="dword" data="00d8d8d8"/>
<value name="ColorTable08" type="dword" data="00585858"/>
<value name="ColorTable09" type="dword" data="00b8b8b8"/>
<value name="ColorTable00" type="dword" data="00181818"/>
<value name="ColorTable01" type="dword" data="00282828"/>
<value name="ColorTable02" type="dword" data="00383838"/>
<value name="ColorTable03" type="dword" data="00585858"/>
<value name="ColorTable04" type="dword" data="00b8b8b8"/>
<value name="ColorTable05" type="dword" data="00d8d8d8"/>
<value name="ColorTable06" type="dword" data="00e8e8e8"/>
<value name="ColorTable07" type="dword" data="00f8f8f8"/>
<value name="ColorTable08" type="dword" data="004246ab"/>
<value name="ColorTable09" type="dword" data="005696dc"/>