jeremykendall/lbtaas
Composer 安装命令:
composer require jeremykendall/lbtaas
包简介
Little Bobby Tables as a Service
README 文档
README
Little Bobby Tables as a Service (LBTaaS) was created as an example of composer create-project
for my Composer presentation
given at TechCamp Memphis on Nov 2, 2013.
Live on the Webs
Check out the production version at http://lbtaas.jeremykendall.net.
Installation
- Install Composer
- Run
composer create-project jeremykendall/lbtaas lbtaas - Add
127.0.0.1 lbtaas.devto/etc/hosts - Create a vhost with
DocumentRootset to/path/to/lbtaas/public - Restart apache
- WIN
Usage
Make a GET request to http://lbtaas.dev/lbt?version=1. You should receive the following JSON response:
{
"status":"success",
"data":{
"name":"Exploits of a Mom",
"permalink":"http:\/\/xkcd.com\/327\/",
"image":"http:\/\/imgs.xkcd.com\/comics\/exploits_of_a_mom.png",
"alt":"Her daughter is named Help I'm trapped in a driver's license factory.",
"link":"\/lbt?version=1&format=json"
}
}
Official xkcd JSON Interface
Unbeknownst to me, there is an actual, no kidding, in production JSON interface for xkcd. From the xkcd About page:
Is there an interface for automated systems to access comics and metadata?
Yes. You can get comics through the JSON interface, at URLs like http://xkcd.com/info.0.json (current comic) and http://xkcd.com/614/info.0.json (comic #614).
So the "real" LBTaaS would be http://xkcd.com/327/info.0.json, wouldn't it?
Official xkcd JSON Interface Response Body
Here's the response body you'll get for Little Bobby Tables from the official JSON endpoint:
{
"month":"10",
"num":327,
"link":"",
"year":"2007",
"news":"",
"safe_title":"Exploits of a Mom",
"transcript":"[[A woman is talking on the phone, holding a cup]]\nPhone: Hi, this is your son's school. We're having some computer trouble.\nMom: Oh dear\u00e2\u0080\u0094did he break something?\nPhone: In a way\u00e2\u0080\u0094\nPhone: Did you really name your son \"Robert'); DROP TABLE Students;--\" ?\nMom: Oh, yes. Little Bobby Tables, we call him.\nPhone: Well, we've lost this year's student records. I hope you're happy.\nMom: And I hope you've learned to sanitize your database inputs.\n{{title-text: Her daughter is named Help I'm trapped in a driver's license factory.}}",
"alt":"Her daughter is named Help I'm trapped in a driver's license factory.",
"img":"http:\/\/imgs.xkcd.com\/comics\/exploits_of_a_mom.png",
"title":"Exploits of a Mom",
"day":"10"
}
```
jeremykendall/lbtaas 适用场景与选型建议
jeremykendall/lbtaas 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 5, 最近一次更新时间为 2013 年 11 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「humor」 「demonstration」 「xkcd」 「Little Bobby Tables」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jeremykendall/lbtaas 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jeremykendall/lbtaas 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jeremykendall/lbtaas 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP library for generating easy to remember but hard to guess passwords
Memorable password generator
Create a standalone Drupal demonstration site with Automated Testing Kit.
A human-memorisable passphrase generator
Demonstration of clean code practices in PHP.
Dad jokes microservice used for testing of Kubernetes, Kong, Istio, Kuma, Nginx, Apigee, Mulesoft, etc
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-11-02