Skip to content

Instantly share code, notes, and snippets.

# my new favorite bashrc function
# quickly inspect source files in style
function pless {
pygmentize $1 | less -r
}
@defunkt
defunkt / installing-mustache.vim.md
Created March 6, 2010 10:21
Installing mustache.vim

mustache.vim

In your shell:

cd ~/.vim
git clone git://github.com/juvenn/mustache.vim.git
mv mustache.vim/syntax/* syntax/
mv mustache.vim/indent/* indent/
mv mustache.vim/ftdetect/* ftdetect/

rm -rf mustache.vim

# sudo gem install mechanize ratom --no-ri --no-rdoc
%W{rubygems mechanize atom/pub net/http}.each { |r| require r }
module Wordpress
# A proof of concept class, displaying how to manage a WP blog through ruby
class Blog
attr_accessor :agent, :blog_uri, :username, :password, :logged_in
def initialize blog_uri, username, password
@username = username
@password = password
@blog_uri = blog_uri.gsub(/\/$/,"") # remove last slash if given
<!DOCTYPE html>
<!-- Helpful things to keep in your <head/>
// Brian Blakely, 360i
// http://twitter.com/brianblakely/
-->
<head>
<!-- Disable automatic DNS prefetching.
@mattkirman
mattkirman / Twitter MacHeist Preferences
Created January 6, 2011 21:23
The super secret MacHeist preferences for Twitter for Mac (Tweetie 2)
defaults write com.twitter.twitter-mac UserTimelineDerepeater -bool true
defaults write com.twitter.twitter-mac ScrollingMakesKeyAndOrdersFront -bool true
defaults write com.twitter.twitter-mac TypeAnywhereToTweet -bool true
defaults write com.twitter.twitter-mac HideInBackground -bool true
defaults write com.twitter.twitter-mac NormalComposeWindowLevel -bool false
defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true
@mirisuzanne
mirisuzanne / reference.mkdn
Created August 22, 2011 23:34
Susy 0.9 Reference Documentation

Susy 0.9 Reference Documentation

See the official Susy site for 1.0 documentation.

Terms

  • Susy Grid: A grid that you build with Susy. You can have multiple on one page if you need.
  • Grid Element: Any HTML element that is aligned to a Susy Grid.
  • Container: The root element in a Susy Grid. Anything inside it is a potential Grid Element.
@nifl
nifl / grok_vi.mdown
Created August 29, 2011 17:23
Your problem with Vim is that you don't grok vi.

Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

Your problem with Vim is that you don't grok vi.

You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).

The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:

0 go to the beginning of this line. y yank from here (up to where?)

" Vim color scheme
"
" Name: railscat.vim
" Maintainer: Jeff Kreeftmeijer
" License: public domain
"
" A GUI only extended version of the Railscasts+ theme, that comes with
" Janus [1] and is, in turn, an extension to the original Railscasts theme
" [2], which is a port of the RailsCasts TextMate theme [3] to Vim.
"
@JeffreyWay
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
@marvinahv
marvinahv / fontsquirrel-font mixin.scss
Last active September 29, 2015 21:48
A little mixin to add fonts from Font Squirrel
// Mixin to use fonts generated by Font Squirrel (http://www.fontsquirrel.com)
@mixin font_squirrel_font($font-name, $file-name){
$font-url: "/font/#{$file-name}";
@font-face {
font-family: $font-name;
src: "#{$font-url}.eot";
src: local("#{$font-name}"), url("#{$font-url}.eot?#iefix") format("embedded-opentype"),
url("#{$font-url}.woff") format("woff"),