Requirements: Mac OS X >= 10.5.2, XCode 3.1, X11
cd /usr/local/src
wget http://mirror.lihnidos.org/GNU/savannah/freetype/freetype-2.3.12.tar.gz
tar xzvf freetype-2.3.12.tar.gz
cd freetype-2.3.12
./configure --prefix=/usr/local
var DateHelper = { | |
// Takes the format of "Jan 15, 2007 15:45:00 GMT" and converts it to a relative time | |
// Ruby strftime: %b %d, %Y %H:%M:%S GMT | |
time_ago_in_words_with_parsing: function(from) { | |
var date = new Date; | |
date.setTime(Date.parse(from)); | |
return this.time_ago_in_words(date); | |
}, | |
time_ago_in_words: function(from) { |
#Для 1100 записів | |
[~/Projects/test2] ./script/performance/benchmarker 10 "Record.test_select" "Record.test_select2" "Record.test_select3" "Record.test_select4" | |
user system total real | |
#1 0.000000 0.000000 0.000000 ( 0.112709) | |
#2 0.110000 0.000000 0.110000 ( 0.168085) | |
#3 0.000000 0.000000 0.000000 ( 0.068406) | |
#4 4.620000 0.030000 4.650000 ( 6.498799) | |
[~/Projects/test2] ./script/performance/benchmarker 100 "Record.test_select" "Record.test_select2" "Record.test_select3" "Record.test_select4" |
data=`/bin/date +%d%m%Y%H%M%S` | |
mysqldump --user=USER --password=PASSWORD --no-data DATABASE > /home/USERNAME/backup/sql-dump-schema.sql | |
mysqldump --user=USER --password=PASSWORD --no-create-info DATABASE > /home/USERNAME/backup/sql-dump-data.sql | |
gzip --best /home/USERNAME/backup/sql-dump-schema.sql | |
gzip --best /home/USERNAME/backup/sql-dump-data.sql | |
/bin/mv sql-dump-schema.sql.gz sql-dump-schema-${data}.sql.gz | |
/bin/mv sql-dump-data.sql.gz sql-dump-data-${data}.sql.gz |
yum install gettext-devel expat-devel curl-devel zlib-devel openssl-devel | |
cd /usr/local/src | |
wget http://kernel.org/pub/software/scm/git/git-1.7.0.tar.gz | |
tar xzvf git-1.7.0.tar.gz | |
cd git-1.7.0 | |
make prefix=/usr/local all | |
make prefix=/usr/local install |
it "should return created smtp account" do | |
doc = Nokogiri::XML(response.body) | |
exclude_columns = %w[id created_at updated_at] | |
SmtpAccount.column_names.each do |col| | |
unless exclude_columns.include? col | |
doc.search("smtp-account #{col.gsub('_', '-')}").text.should == attributes[col.to_sym].to_s | |
end | |
end | |
end |
#Config is there http://github.com/spyou/vim-config | |
#Give a go to vimtutor in order to have a little overview of Vim. | |
"open/save" | |
#:w (save) | |
#:q (quit) | |
#:qa (quit all buffers) | |
#:q! (quit without saving) | |
#:wq (save and quit) |
source "http://rubygems.org" | |
gem "twitter", "~>1.2.2" | |
gem "gchartrb", "~>0.8" |
require 'rubygems' | |
require 'nokogiri' | |
@doc = Nokogiri::XML(File.open("Database.xml")) | |
nodes = @doc.xpath("//object[@type='TODO']") | |
projects = {"0" => {"todos" => [], "title" => 'NEXT'}} | |
nodes.each do |node| | |
todo = {} | |
node.children.each do |attr| | |
if attr["name"] == 'parent' && !attr["idrefs"].nil? |