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 / regex_multiline.py
Created August 25, 2012 01:08 — forked from w3ddd/regex_multiline.py
Python: Multiline Expression Matching
#http://stackoverflow.com/questions/587345/python-regular-expression-matching-a-multiline-block-of-text
re.compile(r"^(.+)\n((?:\n.+)+)", re.MULTILINE)
@VincentVetsch
VincentVetsch / dojo.html
Created August 20, 2012 19:29
HTML: Dojo Implementation
<!DOCTYPE html>
<html>
<head>
<meta charset=”utf-8”>
<title>Tutorial: Hello Dojo!</title>
<!— load Dojo —>
<script src=”//ajax.googleapis.com/ajax/libs.dojo/1.8.0/dojo/dojo.js” data-dojo-config=”async: true”></script>
</head>
<body>
<h1 id=”greeting”>Hello, this is dojo</h1>
@VincentVetsch
VincentVetsch / clients.md
Created August 20, 2012 15:28 — forked from defunkt/clients.md
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@VincentVetsch
VincentVetsch / CreateImage.sh
Created August 16, 2012 16:45
Shell: Create Image of Drive
# Create a Boot image
sudo dd if=/dev/sda of=./OldHD.img
@VincentVetsch
VincentVetsch / test.sh
Created August 16, 2012 16:41
Shell: Create a Bootable Flashdisk form iso file
# Create a Bootable Flashdisk from iso file
sudo dd if=File.iso od=/dev/sdb1
@VincentVetsch
VincentVetsch / menus.vim
Created August 16, 2012 00:04
VIM: Adds a menu to gvim
" in your _vimrc (or .vimrc)
" The "My" identifier is the name of the Menu and binds all the commands together
amenu My.Insert\ a\ VIM\ modeline ggOvim:ff=unix ts=4 ss=4vim60:fdm=markergg
" fName: Only the filename (without path)
" fPath: Only the path
" rName: path+filename relative to current directory
amenu My.Copy\ fName :let @*=expand("%:t")
amenu My.Copy\ fPath :let @*=expand("%:p:h")
@VincentVetsch
VincentVetsch / speechbubble.html
Created August 15, 2012 22:21
HTML: Speech-bubble Div Tag
<div class="speech-bubble speech-bubble-top">
<p>Text goes here.</p>
</div>
@VincentVetsch
VincentVetsch / speechbubble.css
Created August 15, 2012 22:15
CSS: Creates a Speech Bubble
/*
Speech Bubbles
Usage: Apply a class of .speech-bubble and .speech-bubble-DIRECTION
<div class="speech-bubble speech-bubble-top">Hi there</div>
*/
.speech-bubble {
position: relative;
background-color: #292929;
@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