Simplecdn
Laravel 4 simple content delivery network URL rewriter
Install / Use
/learn @damianromanowski/SimplecdnREADME
Simple CDN for Laravel 4
Simple CDN provides a simple way of re-writing your URL's for specific assets using custom defined rules. Offload your assets to a content delivery network by using an origin-pull and re-writing your URL's to point to your off-site host.
Note that URL's will only be rewritten in your production environment!
Installation
To get the latest version of Simple CDN simply require it in your composer.json file.
"damianromanowski/simplecdn": "dev-master"
You'll then need to run composer install to download it and have the autoloader updated.
Note that once Simple CDN has a stable version tagged you should use a tagged release instead of the master branch.
Once Simple CDN is installed you need to register the service provider with the application. Open up app/config/app.php and find the providers key.
'providers' => array(
'Damianromanowski\Simplecdn\SimplecdnServiceProvider'
)
Configuration
Simple CDN provides easy configuration options for various situations. You could for example only rewrite URL's for images and video files, and even cycle between multiple hosts. Simple CDN comes with a configuration file that you can edit at your leisure.
You'll need to run php artisan config:publish damianromanowski/simplecdn to publish the configuration to your application.
Step 1: Enable the rewriter
This is a global setting, if this is disabled, no rules will be processed.
'enabled' => true,
Step 2: Set your URL
If you want to cycle between multiple hosts, just add them to the array.
'url' => array(
'http://cdn1.example.com/',
'http://cdn2.example.com/'
),
Step 3: Define your rules
Define each group of patterns that you want, you can have one for images, css, js and video files that you can quickly enable or disable at any time. The url parameter works just like the global url option, specify multiple to cycle between hosts.
'rules' => array(
array(
'url' => array('http://images.example.com/'),
'pattern' => 'png|tif|tiff|gif|jpeg|jpg|jif|jfif|jp2|jpx|j2k|j2c|ico',
'enabled' => true
),
array(
'pattern' => 'css',
'enabled' => false
),
array(
'pattern' => 'js',
'enabled' => false
),
array(
'url' => array('http://video1.example.com/', 'http://video2.example.com/'),
'pattern' => 'asf|avi|flv|m1v|m2v|m4v|mkv|mpeg|mpg|mpe|ogg|rm|wmv|mp4|webm',
'enabled' => true
)
),
And you're all done!
Related Skills
qqbot-channel
353.1kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
docs-writer
100.7k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
353.1kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
arscontexta
3.1kClaude Code plugin that generates individualized knowledge systems from conversation. You describe how you think and work, have a conversation and get a complete second brain as markdown files you own.



