This file contains 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
" function for working with files with hard line breaks | |
cabbr eighty call Eighty() | |
fun! Eighty() | |
let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1) " highlight any line > 80 characters | |
set textwidth=80 | |
colo neon | |
endfu |
This file contains 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
Works with Ruby 1.8.7, but not Ruby 1.9. This could have been a problem because I manually installed Ruby 1.9. | |
I would guess this is a bug in fileutils, a Windows-related problem, or some combination thereof. | |
##### | |
# test.rb | |
require 'fileutils' | |
filenames = ARGV |
This file contains 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
zsh + couchdb: | |
alias uuid="curl -s http://127.0.0.1:5984/_uuids | sed s/'^.*\\['// | sed s/'].*'// | sed s/'\"'//g | sed s/','/' '/g" | |
Then use `uuid` to put in a uuid. This is useful for local curl'ing. | |
Example: | |
> curl -X PUT -d '{"hello": "world"}' http://127.0.0.1:5984/mydb/`uuid` |
This file contains 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
#!/bin/zsh | |
filename=$1 | |
if [[ -z $filename ]] || [[ $filename == 'help' ]] | |
then | |
echo 'usage: diff_script file.markdown [old_revision] [new_revision]' | |
echo ' old_revision defaults to HEAD^' | |
echo ' new_revision defaults to current file (HEAD if unchanged)' | |
exit | |
fi |
This file contains 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
- if @last_tweet_time.nil? || @last_checkin_time.nil? | |
.header.hmm | |
Had problems querying services. Try again later. | |
- else | |
- last_action = @last_tweet_time > @last_checkin_time ? @last_tweet_time : @last_checkin_time | |
- if last_action > 2.hours.ago | |
.header.alive | |
Anthony is definitely alive! | |
- elsif last_action > 6.hours.ago | |
.header.alive |
This file contains 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
Oct-30 3:38 PM | |
Oct-30 3:38 PM | |
Oct-30 3:39 PM | |
Oct-30 3:39 PM | |
Oct-30 3:40 PM | |
Oct-30 3:40 PM | |
Oct-30 3:40 PM | |
Oct-30 3:41 PM | |
Oct-30 3:41 PM | |
Oct-30 3:44 PM |
This file contains 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
Given this document email_readme.md (equals signs not included): | |
=========================================== | |
# Sample document | |
## More Help | |
Please send any questions or ideas on how this documentation can be improved to <a href="mailto:[email protected]">[email protected]</a>. Thanks! | |
=========================================== |
This file contains 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 ruby | |
ideas = [] | |
current_lines = [] | |
lines = File.read('post_ideas.txt') | |
lines.split("\n").each do |line| | |
next if line.strip == '' | |
if line =~ /^==========/ | |
if current_lines != [] |
This file contains 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
" Vim global plugin for better digraph interactions... | |
" Maintainer: Damian Conway | |
" License: This file is placed in the public domain. | |
"############################################################################## | |
"## ## | |
"## To use: ## | |
"## ## | |
"## inoremap <expr> <C-K> BDG_GetDigraph() ## | |
"## ## |
This file contains 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
#!/bin/bash -l | |
set -e | |
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting | |
export PATH | |
export LANG="en_US.UTF-8" | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" |
OlderNewer