Skip to content

Instantly share code, notes, and snippets.

@anishsane
anishsane / openconnect-sso-wrapper.py
Last active October 31, 2022 03:23
A wrapper over the vlaci/openconnect-sso for windows
#!/usr/bin/env python
# Module : SysTrayIcon.py
# Synopsis : Windows System tray icon.
# Programmer : Simon Brunning - simon@brunningonline.net
# Date : 11 April 2005
# Notes : Based on (i.e. ripped off from) Mark Hammond's
# win32gui_taskbar.py and win32gui_menu.py demos from PyWin32
import os
@anishsane
anishsane / cscope-bang.patch
Created May 17, 2017 05:38
Adds a bang option to cscope and scsope commands in vim. With bang, it will not jump to the first match.
diff -uNrp vim.orig_cscope/runtime/doc/if_cscop.txt vim/runtime/doc/if_cscop.txt
--- vim.orig_cscope/runtime/doc/if_cscop.txt 2016-10-14 15:34:12.783474620 +0530
+++ vim/runtime/doc/if_cscop.txt 2016-10-14 15:37:55.947476646 +0530
@@ -264,6 +264,8 @@ The default value is "" (don't use quick
seems to be useful: >
:set cscopequickfix=s-,c-,d-,i-,t-,e-,a-
<
+If cscope was executed with !, Vim will not jump to the first error in
+the quickfix window.
*cscopetag* *cst*
@anishsane
anishsane / putty-to-ssh.sh
Last active May 17, 2017 05:50
Parse putty options in a bash script and launch ssh command
#!/bin/bash
# Sample command arguments supported:
# "/path/to/putty.exe" -ssh -load "anishsane-dev" -l asane anishsane-dev
# "/path/to/putty.exe" -load "anishsane-dev"
# "/path/to/putty.exe" -local <~~~ This is not a standard putty option.
# But it is allowed to pass arbitrary options
# to putty binary from mtputty.
local_session=false
for ((i=1;i<=$#;i++)); do
@anishsane
anishsane / QuickFixCurrentLine.patch
Created September 16, 2016 07:52
This patch adds a new highlight group 'QuickFixCurrentLine' for current selection in quickfix window
# Author: Anish sane
#
# My SO profile: http://stackoverflow.com/users/793796/anishsane
#
# Description:
#
# By default vim highlight the current selection with 'Search' highlight rules.
# It's hard-coded in the vim source code.
# Because of this, it's difficult to search for something within the quick fix window.
#