Skip to content

Instantly share code, notes, and snippets.

# Command for listing installed packages with Debian or Ubuntu
dpkg --get-selections
namespace :doc do
namespace :diagram do
task :models do
sh "railroad -i -l -a -m -M | dot -Tsvg | sed 's/font-size:14.00/font-size:11.00/g' > doc/models.svg"
end
task :raw_models do
sh "railroad -i -l -a -m -M > doc/models.dot"
end
Here's how to do a cp without requesting those stinkin' ._ (dot underscore) files (like if you are copying them to WebDAV or another network mounted drive).
cp -X [file] [destination]
This took me forever to find.
require 'rubygems'
require 'mechanize'
a = WWW::Mechanize.new { |agent|
agent.user_agent_alias = 'Mac Safari'
}
def find_page_with_verses(agent, page)
if page.search("div.verse").size > 0
return page
@jimmyz
jimmyz / gist:74169
Created March 5, 2009 03:34
Mock up of what the API may look like
require 'fs-communicator'
require 'fs-identity-v1'
require 'fs-familytree-v1'
require 'fs-reservation-v1'
require 'fs-recordsearch-v1'
com = FsCommunicator.new :domain => 'https://api.familysearch.org', 'WCXY-BBPN-0TU53-X', "Application/0.1"
com.identity_v1.login 'username','password'
response = com.familytree_v1.person 'KWQS', :params => 'values'
response = com.familytree_v2.person ['KWQS','9652'], :hash => 'option', :other => 'option'
[user]
name = Jimmy Zimmerman
email = [email protected]
[color]
diff = auto
status = auto
branch = auto
[github]
user = jimmyz
token = [token]
export LSCOLORS=cxfxcxdxbxegedabagacad
alias ls="ls -G -F"
alias ll="ls -l"
alias la="ls -a"
# Distributed under MIT License - See LICENSE
require 'family_tree_api/client'
# For session handling, if you have an active session,
# go ahead and insert it in here. Otherwise, set session = nil and
# it will use the ft.authenticate to authenticate you.
#session='USYS2AADBB47B3A6043209CBE16725938464.ptap009-035'
client = FamilyTreeApi::Client.new 'http://www.dev.usys.org', 'KEY'