Skip to content

Instantly share code, notes, and snippets.

View gist:3468ec8f4571cada07c2
convert -density 300 odd.pdf\[0\] 0.pdf
@asmega
asmega / gist:d39cff367ee84e351eb4
Created Jan 18, 2015
Import Export Momento to Google Calendar via csv
View gist:d39cff367ee84e351eb4
require 'date'
class Event
attr_reader :title, :date, :time
def initialize(title, date, time)
@title = title
@date = date
@time = time
end
View gist:908eac85ad97c880190f
rename 's/.css.scss/.scss/g' *.css.scss
@asmega
asmega / gist:ae2c2ed73d9bb0f75df8
Created Feb 8, 2015
postgresql index on point column
View gist:ae2c2ed73d9bb0f75df8
CREATE INDEX ON establishments using gist (geo);
View gist:5ebb20b527296aa6ccab
mysql -u USERNAME -h 127.0.0.1 -p DB_NAME < FILE.SQL
@asmega
asmega / gist:05bc7d345e69b14e1a5b
Last active Aug 29, 2015
probable custom form builder
View gist:05bc7d345e69b14e1a5b
# code from nested form
module NestedForm
class Builder < ::ActionView::Helpers::FormBuilder
include ::NestedForm::BuilderMixin
end
end
####################
View gist:124865
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb install mysql
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... no
checking for mysql_query() in -lmysqlclient... no
View gist:124868
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb install mysql
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1
View gist:149980
1) Error:
test_the_truth(Admin::FilmControllerTest):
Mysql::Error: Access denied for user 'root'@'localhost' (using password: NO)
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
View gist:149984
1) Error:
test_the_truth(Admin::FilmControllerTest):
Mysql::Error: Unknown database 'application_name_test'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'