Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:%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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://stackoverflow.com/questions/587345/python-regular-expression-matching-a-multiline-block-of-text | |
re.compile(r"^(.+)\n((?:\n.+)+)", re.MULTILINE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a Boot image | |
sudo dd if=/dev/sda of=./OldHD.img |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a Bootable Flashdisk from iso file | |
sudo dd if=File.iso od=/dev/sdb1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="speech-bubble speech-bubble-top"> | |
<p>Text goes here.</p> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
NewerOlder