Skip to content

Instantly share code, notes, and snippets.

@Bodacious
Bodacious / pesapal.rb
Last active December 17, 2015 14:39
pesa-pal integration in Rails [incomplete]
module PesaPal
include ActiveSupport::Configurable
self.configure do |config|
config.test_mode = !Rails.env.production?
config.consumer_key = Rails.env.production? ? "" : ""
config.consumer_secret = Rails.env.production? ? "" : ""
config.merchant_email = Rails.env.production? ? "" : "you@examle.com"
@Bodacious
Bodacious / pesapal.rb
Last active October 25, 2016 17:49
PesaPal OpenAuth integration (not working yet)
require 'oauth'
require 'uri'
key = # my Consumer Key (sandbox)
sec = # my Consumer Secret (sandbox)
SITE_URL = 'https://demo.pesapal.com'
# An XML string of param data to include with our request
RAW_XML = <<-XML
@Bodacious
Bodacious / Katana Code's Git Strategy.md
Created April 14, 2013 18:38
Here's KatanaCode's Git Strategy which each of us use across all of the projects we're involved with

Katana Code's Git Strategy

Introduction

The purpose of this document is to define the strategy which all Katana Code employees and subcontractors must adhere to when working on Katana Code projects.

The aim is to develop a uniform, coherent and effective solution. This document is not written in stone and can be updated as and when better approaches are discovered.

Topic Branches

@Bodacious
Bodacious / app_delegate.rb
Created October 22, 2012 17:11
Simple Rubymotion app with UIAlertView
class MyController < UIViewController
def viewDidLoad
self.view.backgroundColor = UIColor.whiteColor
alert.show
end
# ==============
# = Properties =
# ==============
@Bodacious
Bodacious / README.md
Created September 21, 2012 09:06
What's in your RubyMotion project's Rakefile?

There's not a great deal of documentation on the options available when configuring your Rakefile in Rubymotion.

I figure having the community share what's in theirs will help other developers get a better idea of how they should configure their own project.

@Bodacious
Bodacious / Rakefile
Created August 23, 2012 11:19
my Rakefile for lastest Rubymotion app
$:.unshift("/Library/RubyMotion/lib")
require File.join(File.dirname(__FILE__), 'version')
require 'motion/project'
require 'bundler'
Bundler.require
@Bodacious
Bodacious / base.rb
Created August 20, 2012 17:56
An "ActiveRecord" library for RubyMotion
module ActiveRecord
class Base
COLUMN_TYPES_MAPPING = {
:int => 'INTEGER',
:long => 'INTEGER',
:longLongInt => 'BIGINT',
:bool => 'BOOLEAN',
:double => 'DECIMAL',
@Bodacious
Bodacious / REAME.md
Created July 6, 2012 13:05
Transposing An Existing XCode Project to Rubymotion

For the last two weeks I've been working flat out with Rubymotion, a new toolchain that allows developers to build native iOS applications using the beautiful, elegant Ruby programming language instead of the verbose and somewhat fussy Objective-C programming language.

The app I've been working on is an existing client app we've been developing for several months. The app was about 80% ready for a pilot launch but still had quite a bit of development to go before being shipped. After discussing Rubymotion with the client, we agreed that it would save us both time and money in future development if we move over to Rubymotion. I was tasked with doing the migration; transposing the entire application to Rubymotion.

Timescale

For those of you looking to do the same, here are some stats that might help you estimate the time required and the costs

This is a work in progress...

Sexy: らにXン

@Bodacious
Bodacious / README.md
Created June 28, 2012 13:16
A handy helper for showing loading cells in iOS Apps with Rubymotion