海外勢/日本人のScala(エンジニア/ユーザ)の中で、特にフォローしておくといい方のTwitterアカウントを集めてみました。作成途中なので、突っ込み歓迎。fork歓迎。
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
namespace :myapp do | |
desc 'Captures a heroku bundle and downloads it. The downloaded files are stored in backups/' | |
task :backup do | |
app_name = RAILS_ROOT.split('/').last | |
timestamp = `date -u '+%Y-%m-%d-%H-%M'`.chomp | |
bundle_name = "#{app_name}-#{timestamp}" | |
puts "Capturing bundle #{bundle_name}..." | |
`heroku bundles:capture --app #{app_name} '#{bundle_name}'` | |
# poll for completion (warning, a little hacky) | |
begin |
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
virtualenv --no-site-packages . | |
source bin/activate | |
bin/pip install Django psycopg2 django-sentry | |
bin/pip freeze > requirements.txt | |
bin/django-admin.py startproject mysite | |
cat >.gitignore <<EOF | |
bin/ | |
include/ | |
lib/ | |
EOF |
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
[OptimizeGoogle] | |
http://itpro.nikkeibp.co.jp/word/* | |
http://*.ceron.jp/* | |
http://ceron.jp/* | |
http://tweetbuzz.jp/* | |
/http:\/\/(\w+\.)*buzzurl\.jp//i | |
http://wadaino.jp/* | |
http://eimg.jp/* | |
http://*.eimg.jp/* | |
http://d.hatena.ne.jp/keyword/* |
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
# simple extension to ActiveMerchant for basic support of recurring payments with Express Checkout API | |
# | |
# See http://http://clockobj.co.uk/2008/09/07/ruby-on-rails-paypal-express-recurring-payments-using-active-merchant/ | |
# for details on getting started with this gateway | |
# | |
# | |
module ActiveMerchant #:nodoc: | |
module Billing #:nodoc: | |
class PaypalExpressRecurringNvGateway < Gateway | |
include PaypalNvCommonAPI |
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
# The MIT License | |
# | |
# Copyright (c) 2008 Vuzit.com, Chris Cera, Tobias Luetke | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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
class PaypalController < ApplicationController | |
protect_from_forgery :except => :paypal_ipn | |
# This will be called when soemone first subscribes | |
def sign_up_user(custom, plan_id) | |
logger.info("sign_up_user (#{custom})") | |
end | |
# This will be called if someone cancels a payment |
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
module ActiveMerchant #:nodoc: | |
module Billing #:nodoc: | |
class PaypalGateway < Gateway | |
RECURRING_ACTIONS = Set.new([:add, :modify, :inquiry, :suspend, :reactivate, :cancel]) | |
# Creates a recurring profile | |
def create_recurring_profile(*args) #:nodoc: | |
request = build_recurring_request(:add, *args) | |
commit('CreateRecurringPaymentsProfile', request) |
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
credit_card = { | |
:type => '[cc type, e.g. 'visa']', | |
:number => '[cc number, from test account]', | |
:verification_value => '123', | |
:month => '[expiration month, from test account]', | |
:year => '[expiration year, from test account]', | |
:first_name => '[first name, can be anything]', | |
:last_name => '[last name, can be anything]', | |
:street_1 => '[street address, can be anything]', | |
:city => '[city, can be anything]', |
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
credit_card = { | |
:type => '[cc type, e.g. 'visa']', | |
:number => '[cc number, from test account]', | |
:verification_value => '123', | |
:month => '[expiration month, from test account]', | |
:year => '[expiration year, from test account]', | |
:first_name => '[first name, can be anything]', | |
:last_name => '[last name, can be anything]', | |
:street_1 => '[street address, can be anything]', | |
:city => '[city, can be anything]', |