Skip to content

Instantly share code, notes, and snippets.

View VincentVetsch's full-sized avatar

Vincent Vetsch VincentVetsch

  • McGlenn Home Inspections, LLC
  • Norfolk, NE
View GitHub Profile
@VincentVetsch
VincentVetsch / sandr
Created August 25, 2012 17:31
VIM: Search and Replace
:%s/foo/bar/g
Find each occurrence of 'foo', and replace it with 'bar'.
:%s/foo/bar/gc
Change each 'foo' to 'bar', but ask for confirmation first.
:%s/\<foo\>/bar/gc
Change only whole words exactly matching 'foo' to 'bar'; ask for confirmation.
:%s/foo/bar/gci
@VincentVetsch
VincentVetsch / Python:Gio:Lookup
Created August 15, 2012 15:20
Python: Lookup a website and make a connection
#!/usr/bin/env python
#
# [SNIPPET_NAME: Lookup website]
# [SNIPPET_CATEGORIES: GIO]
# [SNIPPET_DESCRIPTION: Lookup a website and make a connection]
# [SNIPPET_AUTHOR: Andrew Breiner <[email protected]>]
# [SNIPPET_LICENSE: GPL]
# [SNIPPET_DOCS: http://www.pygtk.org/docs/pygobject/gio-class-reference.html]
# This example was taken from an example done in the Vala programming