某储备粮的“学习笔记”

by 咳嗽di小鱼

Kaching is a simple payments solution for Express-based web app, inspired by Passport.js. Together with various strategies, Kaching provides a unified control flow to hook up with different online payment services.

For now, Kaching only provides kaching-paypal to accepting payment through Paypal. More strategies are under plan.

Install

$ npm install kaching
$ npm install kaching-paypal

Example

https://github.com/gregwym/kaching/tree/master/example

Usage

0. Setup with Kaching

Paypal strategy require the client_id and client_secret offered by Paypal to operate. You can obtain them from https://developer.paypal.com/webapps/developer/applications.

It use api.sandbox.paypal.com as the default paypal host address. Feel free to change it in production environment.

var PaypalStrategy = require('kaching-paypal');
var kaching = require('kaching');

kaching.use(new PaypalStrategy({
  host: '<paypal_rest_api_endpoint>',        // optional
  port: '',                                  // optional
  client_id: '<paypal_client_id>',
  client_secret: '<paypal_client_secret>'
}));

Read more...


Back to the time it works

In my last release of doGRT, I was proudly announcing the AUTO UPDATE feature. The feature which would let my user updates the schedule data without update the entire app from the App Store. I spent quite a bit of time to implement this feature, and put the schedule data on a place that I thought will never let me down - Github.

Seriously, it was working like a charm. At least during the time I was testing it. Unfortunately, the feature died before anyone can actually try it out.

What happened?

Right before the schedule season change, Github put out a blog post saying "Goodbye, Uploads". At the main while, they replaced the Downloads Section with Tags and completely disabled the upload.

So what does that mean?

Even tho Github will keep the downloads page for 90 days, I cannot upload any new file to it. Cannot upload means I cannot tell my app "A newer version of schedule is available, go download it!!!!"

How sad is that`T_T

Github, can't you tell me this a bit earlier? or allow upload for extra 90 days? sigh

What I'm going to do?

First, I wanna say sorry to doGRT users. If it is not the case, you guys would have the hot and fresh holiday schedule in your hand now. This situation should have been avoided if I have left enough flexibility in my implementation.

Of course, I'm going to fix it! Going to release a quick fix version with Winter schedule first.

The more feature I'm working on:

  • Day picker: Look up schedules for a specific day, so you can plan ahead.
  • Bus reminder: Remind you to catch/get off at a curtain bus stop
  • GRT Twitter message intergration

Feel free to @gregwym on twitter about your suggestions. Or you can email me through the feedback button in the app.

Merry Christmas,
Greg


First of all, the repo: https://github.com/gregwym/InformaticToolbar

Intro

Remember in the Mail App, it shows update status and sending mail progress in the bottom toolbar. I think it is a really neat way to show information, especially for those apps who use native iOS UI elements.

However, I couldn't find any lib out there for this task. So I decide to invent the wheel myself.

Feel free to post any issues or patch. It's my pleasure for any who like my work.

What it does

InformaticToolbar is mainly an UIViewController Category which allows you to add several UIBarButtonItems set to your toolbar.

The sets are defined as subclasses of ITBarItemSet. All ITBarItemSet can have a dismiss button if the target and action has been defined. If more than one set has been added, a switch button (an arrow) will be displayed on the left for user to switch between sets.

For now, there are three pre-defined set:

  • ITLabelBarItemSet: a textLabel and a detailTextLabel
  • ITProgressBarItemSet: a textLabel and a progressBar
  • ITConfirmationBarItemSet: two label and a check-mark button

You can easily create new sets by extending ITBarItemSet yourself.

Screenshot:

Screenshot

Read more...


As you can see, I changed the entire blog into english, except the posts I wrote before and the blog title. It doesn't mean I will not write in Chinese any more. It's because I thought, in order to be standing out among the people around North America, I gotta have something the North America people can read and understand.

Just finished my 3B term @ University of Waterloo. Learnt a lot, worked a lot...
Things that I was or is recently working on:

  • doGRT: Going to implement the iPad UI. Refactor the entire app if I have time.
  • Moe FM: Refactoring the entire app. Adding bunch of new features. (Hope you guys are still waiting for it)
  • CampusNav: It's the project we made for our Software Architecture class. I'm planning to push it to the App Store.
  • Yodo1 SDK: Review and help improve the SDK.

These should be able to keep me busy for my Summer, lol. Gotta stop playing around and start working now.

Wish everyone has a nice summer.


Software Design Process Models

Design as search. Design spaces. Design state, goal structure, generative design operations, early quantitative evaluations, control of design process. Basic models of design (transformational, plan/architecture driven). Relationship to other life-cycle activities.

Terms

  • Module: a collection of classes
  • Subsystem: a collection of classes with an interface
  • Design window: the time, which design decision have to be made
  • Service: the operation in common purpose, offered by a subsystem

Read more...