Skip to content

Instantly share code, notes, and snippets.

@akonan
akonan / gist:79d0fc9a6d3e8a309b36
Created October 19, 2014 14:11
postgresql fix for yosemite
mkdir /usr/local/var/postgres/pg_tblspc && mkdir /usr/local/var/postgres/pg_twophase && mkdir /usr/local/var/postgres/pg_stat_tmp
@akonan
akonan / gist:9741411
Created March 24, 2014 14:40
keybase.md
### Keybase proof
I hereby claim:
* I am akonan on github.
* I am anttiakonniemi (https://keybase.io/anttiakonniemi) on keybase.
* I have a public key whose fingerprint is 3B85 8AA2 42C5 AFB9 A958 4A81 D86F EEA1 CB48 597A
To claim this, I am signing this object:
Information:
<iframe allowtransparency="true" width="100%" height="225" scrolling="no" src="http://www.wodconnect.com/gyms/3/widgets/info"></iframe>
With workouts:
<iframe allowtransparency="true" width="100%" height="380" scrolling="no" src="http://www.wodconnect.com/gyms/3/widgets/schedule"></iframe>
MacBook Pro 15-inch with Retina Display
Z0ML
Specifications
Processor: (065-C0MX) - 2.6GHz Quad-core Intel Core i7#@ Turbo Boost up to 3.6GHz
Memory: (065-0474) - 16GB 1600MHz DDR3L SDRAM
Storage: (065-0478) - 512GB Flash Storage
Keyboard and Documentation: (K065-0490) - Backlit Keyboard (Finnish) / User’s Guide (Finnish)
Laptop + Apple Care 36 month deal 82 € per month.
@akonan
akonan / gist:3156205
Created July 21, 2012 15:47
Using sqlite for dev and testing and pg in production
group :test, :development do
gem "sqlite3"
end
group :production do
gem "pg"
end
@akonan
akonan / controller.rb
Created May 4, 2012 08:51
Controller for AM
def process_payment
notify = ActiveMerchant::Billing::Integrations::Verkkomaksut::Notification.new(params)
if notify.acknowledge(VERKKOMAKSUT_AUTHCODE)
# PROCESS THE ORDER
else
# SHOW ERROR MESSAGE AND DON'T PROCESS THE ORDER
end
end
@akonan
akonan / view.html.erb
Created May 4, 2012 08:50
View for AM
<% payment_service_for 2, "13466",
:amount => "200", :currency => 'EUR', :credential2 => VERKKOMAKSUT_AUTHCODE,
:service => :verkkomaksut do |service|
service.customer :first_name => "antti",
:last_name => "akonniemi",
:phone => "0405051909",
:email => "0405051909"
service.billing_address :city => "Helsinki",
:address1 => "Toinen linja 2 A D 65",
@akonan
akonan / Gemfile
Created May 29, 2011 11:47
Steps to get Google OpenID working with Devise and Omniauth
# Add this line to your Gemfile
gem "oa-openid", :require => "omniauth/openid"
fi:
errors:
messages:
not_found: "ei löytynyt"
already_confirmed: "on jo vahvistettu, yritä kirjautua sisään uudelleen"
not_locked: "ei ollut lukittu"
not_saved:
one: "1 virhe esti %{resource} tallentamisen:"
other: "%{count} virhettä esti %{resource} tallentamisen:"
namespace :passenger do
desc "Restart Application"
task :restart do
#run "ln -fs #{deploy_to}/shared/index/ #{current_path}/index"
run "ln -fs #{deploy_to}/shared/logos/ #{current_path}/public/logos"
run "ln -fs #{deploy_to}/shared/pictures/ #{current_path}/public/pictures"
run "chmod -R o-w #{current_path}/public"
run "chmod -R g-w #{current_path}/public"
run "killall dispatch.fcgi || true"
end