Skip to content

Instantly share code, notes, and snippets.

View gist:8767641
diff -r 55cd783bbc2d src/os_win32.c
--- a/src/os_win32.c Sun Jan 05 13:29:26 2014 +0100
+++ b/src/os_win32.c Wed Jan 08 15:32:18 2014 +0900
@@ -232,6 +232,67 @@
static char_u *exe_path = NULL;
+ static BOOL
+ HANDLE hConsoleInput,
View RunPS.cmd
@echo off
if "%USERPROFILE:~-1,1%" == "\" set USERPROFILE=%USERPROFILE:~0,-1%
set HOMEDRIVE=%~d0
set HOMEPATH=%~p0
if "%HOMEPATH:~-1,1%" == "\" set HOMEPATH=%HOMEPATH:~0,-1%
Maximus5 / install.cmd
Created Jun 20, 2014
ConEmu installation with single command
View install.cmd
powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString(''))"
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
View non-blocking-stdin.php
function nonBlockingReadLineFromStdIn()
$read = array(STDIN);
$write = array();
$except = array();
var_dump('Before stream select.');
$result = stream_select($read, $write, $except, 0);
var_dump('After stream select.', $result);
View base16-default.xml
<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"/>
View base16-default-light.xml
<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"/>

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
View git.lua
-- This file is intended to be used with 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 / gist:2e83699883922f687874
Created Jan 23, 2015
Samle ConEmu's quake configuration
View gist:2e83699883922f687874
<?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"/>