Skip to content

Instantly share code, notes, and snippets.

View tylerlong's full-sized avatar

Tyler Liu tylerlong

View GitHub Profile
@tylerlong
tylerlong / passed.json
Created February 22, 2017 05:53
Travis sample payloads
{
"payload": "{\"id\":201403814,\"repository\":{\"id\":12072164,\"name\":\"travis-webhook-demo\",\"owner_name\":\"tylerlong\",\"url\":null},\"number\":\"5\",\"config\":{\"language\":\"node_js\",\"node_js\":[\"7.5\"],\"notifications\":{\"webhooks\":{\"urls\":[\"http://devproxy-public.asialab.glip.net/webhook-tyler.liu/ea7f2d9e-91a1-4ae4-bd9b-1737c39908ec\"],\"on_success\":\"always\",\"on_failure\":\"always\",\"on_start\":\"always\"}},\".result\":\"configured\",\"group\":\"stable\",\"dist\":\"precise\"},\"status\":0,\"result\":0,\"status_message\":\"Passed\",\"result_message\":\"Passed\",\"started_at\":\"2017-02-14T05:55:49Z\",\"finished_at\":\"2017-02-14T05:56:19Z\",\"duration\":30,\"build_url\":\"https://travis-ci.org/tylerlong/travis-webhook-demo/builds/201403814\",\"commit_id\":57662095,\"commit\":\"7a079a2999a54981d1e5ba4c668a90441234da2f\",\"base_commit\":null,\"head_commit\":null,\"branch\":\"master\",\"message\":\"Add one more test case\",\"compare_url\":\"https://github.com/tylerlong/travis-webhook
@tylerlong
tylerlong / README.md
Last active February 20, 2017 07:19
和通花园租客相关费用

2017年03月18号退房:

  • 煤气表读数:xxx,上次是 500.463
  • 电表读书:yyy,上次是 11887.6
  • 水表读数: zzz,上次是 30

费用明细

  • 煤气 xxx - 500.463 = ,每立方 3.5 元,共计: 元

I am thinking maybe it's better to create our own bot platform to replace hubot. I have several reasons to say so:

  1. Hubot is simple, It's easy to replace it. Basically what hubot does is: receive and send messages (via adapters), match with regex and invoke scripts.
  2. It's not hard to reuse existing hubot scrits for other bot platforms. Most hubot scrits are quite regular, thanks to the simplicity of Hubot. We could even write a tool to migrate exiting hubot scripts automatically.
  3. Hubot has long history but it has never been truely popular. Which implies that there are essential architectural defeats.
    1. It doesn't provide enough levels of abstraction from OOA's perspective. It only provides end programmers with the concept of "scripts".
    2. A "script" file (js or coffee) could have several "scripts", and the help information of those scripts are read from the comments of the source code.
    3. The concept is confusing and the design is not very elegant.
  4. Hubot doesn't support complex opera
@tylerlong
tylerlong / 1.md
Last active October 16, 2016 09:51
React & Redux

React & Redux 学习笔记 - 第一篇:术语浅析

这是 React & Redux 学习笔记 系列文章的第一篇。这篇主要分析各种术语。参考来自各种技术官网的文档,夹杂了笔者的个人体会和理解。

文章分为两部分,第一部分讲 React 相关的术语,第二部分讲 Redux 相关的术语。每一部分都把相对最重要的术语放在了前面。

通过阅读这篇文章,读者可以全面掌握各种核心 React & Redux 术语。 在听别人讨论相关技术问题的时候,能够及时进入语境,理解别人谈话的内容,不再如闻天书、不知所以。

由于术语数量比较多,一下子记不住也没关系。可以在碰到相关术语的时候,来这里查一下。

@tylerlong
tylerlong / README.md
Last active June 12, 2016 21:30
C# SDK 1.0.0

RingCentral C# SDK 1.0.0 has been released

It is the first major release of the C# SDK. It contains lots of bug fixes, improvements as well as some new features.

Portable Class Library

Portable class libraries can help you to reduce the time and costs of developing and testing code. Use this project type to write and build portable .NET Framework assemblies, and then reference those assemblies from apps that target multiple platforms such as Windows, Xamarin.iOS and Xamarin.Android.

Before 1.0.0, we have different SDK projects for different platforms. On some platforms, users even have to compile the code themselves. We turned to PCL (Portable Class Library) with the 1.0.0 release. No matter what platform you are targeting, you can install our SDK via NuGet: Install-Package RingCentralSDK, no more manual compiling and dependency management.

@tylerlong
tylerlong / README.md
Last active May 13, 2016 11:31
RingCentral Swagger Specification
@tylerlong
tylerlong / README.md
Last active May 13, 2016 07:08
documentation bugs

Leg Info

result attribute:

'Unknown' | 'ResultInProgress' | 'Missed' | 'Call accepted' | 'Voicemail' | 'Rejected' | 'Reply' | 'Received' | 'Receive Error' | 'Fax on Demand' | 'Partial Receive' | 'Blocked' | 'Call connected' | 'No Answer' | 'International Disabled' | 'Busy' | 'Send Error' | 'Sent' | 'No fax machine' | 'ResultEmpty' | 'Account ' | 'Suspended' | 'Call Failed' | 'Call Failure' | 'Internal Error' | 'IP Phone offline' | 'Restricted Number' | 'Wrong Number' | 'Stopped' | 'Hang up' | 'Poor Line Quality' | 'Partially Sent' | 'International Disabled' | 'International Restriction' | 'Abandoned' | 'Declined' | 'Fax Receipt Error' | 'Fax Send Error'

International Disabled appears twice.

<Window x:Class="ResizeWindowSample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ResizeWindowSample"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Button x:Name="button" Content="Button" HorizontalAlignment="Center" VerticalAlignment="Center" Width="75" Click="button_Click"/>
</Window>

first line




another line