Skip to content

Instantly share code, notes, and snippets.

Addison Yangwendaxia

Block or report user

Report or block Yangwendaxia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Yangwendaxia /
Created Jan 14, 2019 — forked from zxhfighter/



  • 代码仓库管理者给你添加该仓库的写入权限,这样的话可以直接push
  • 如果不能直接push(大多数情况),采用经典的fork & pull request来提交代码,下面讲述这种情况

fork & pull request


View RESTful API 最佳实践摘要.md

The content of this article is from Vinay Sahni's Best Practices for Designing a Pragmatic RESTFul API. Really enjoyed this article!

Key requirements for the API

some requirements that the API must strive for:

  1. It should use web standards where they make sense
  2. It should be friendly to the developer and be explorable via a browser address bar
  3. It should be simple, intuitive and consistent to make adoption not only easy but pleasant
  4. It should provide enough flexibility to power majority of the Enchant UI
  5. It should be efficient, while maintaining balance with the other requirements
View 软件系统设计.md

#如何一步一步打造高可扩展性的应用程序? 随着项目的规模越来越大,项目的维护性可能会变得越来越差,有时可能会出现牵一发而动全身的情况。如果需要修改某个功能的代码,就会耗费大量的人力和时间。此时,高可扩展性、低耦合的应用程序就变得非常重要了。构建高扩展性的应用的要点在于构建组成该应用的小的、单个的模块。 编写自包含、自封装、不影响其他组件的代码,最大化地减少依赖。利用一系列用于架构解耦和测试的工具,以及各种设计模式解决方案。比如依赖注入(dependency injection)、观察者模式(observer pattern)、中介者模式(mediator pattern)、外观模式(facade pattern)、命令模式(command pattern),面向对象(OOP)工具集。

#如何保证Web应用程序安全性? Web应用程序是当今多数企业应用的前沿阵地。本文分析了保障Web应用程序的安全未必意味着延长开发周期以及如何保证Web应用程序安全性。


View Mac 环境变量设置(Git 安装为例).md

Mac 环境变量设置(Git 安装为例)


vim ~/.bash_profile


export PATH ="/usr/local/bin:$PATH" ...


source ~/.bash_profile

View Laravel 5.1 上本地化操作.md

1. Laravel 5.1 上实现 Carbon 类本地化

在 app/Providers/AppServiceProvider.php 的boot()方法加上:



#2. Model Factory 生成本地化数据 在 AppServiceProvider.php boot() 方法内加入如下内容:

View Laravel 5.1 利用 Seeder 生成测试数据(范例).md

#Laravel 5.1 利用 Seeder 生成测试数据(范例)

1. 生成 Model 文件及数据表定义文件

    php artisan make:model Lesson -m

2. 定义数据表,生成数据库表

class CreateLessonsTable extends Migration
View Laravel5.1定时任务实现步骤.md

#实现定时任务(范例) ##1. php artisan make:console LogInfo ##2. 在项目Console/Commands 文件夹下编辑 LogInfo.php

        protected $signature = 'lesson:log';
        protected $description = 'Log Info';

        public function handle(){
            \Log::info('It Works'); //这里你可以实现自己的定时任务功能逻辑
Yangwendaxia / 0_reuse_code.js
Created Nov 19, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.