Skip to content

Instantly share code, notes, and snippets.

View wastemobile's full-sized avatar

wastemobile wastemobile

View GitHub Profile

#Meteor and Self-hosted Infrastructure

Meteor is an eye-opening JavaScript framework that runs on both the client and the server, giving developers a revolutionary take on software engineering. If you are not familiar with Meteor, I urge you to visit their website.

##An overview

In this brief gist, I am going to discuss the process of setting up a server (in my case, a VPS) to host Meteor applications.

My experience with Meteor has been brief, however it has not taken much demonstration for me to realise the significance of this stellar framework. Let's jump right in!

1 介紹

[Symphony][1] 很棒,讓我們來讓它更好。

這文章與建立網站的前端相關,維持模板(templates)能夠重複利用,關聯資料來源(Datasources)、事件(Events)以及其他資源到你的頁面(Pages),程式碼的架構,還有更多。這文件的起心動念,是因為發現自己不停的重複再重複相同流程,才有了改良的意圖。

假設你已經知道 Symphony CMS 的 [master.xsl][2] 是什麼,同時也已經用過它。如果你還不明瞭,請先參考 [Symphony 的預設 workspace][3].

2 一切從需求開始

@wastemobile
wastemobile / main.js
Created September 5, 2013 16:46 — forked from MoOx/main.js
Zurb Foundation 是非常好的建構,彈性比 Bootstrap 大,唯一的缺點就是對 IE 的支援度比 Bootstrap 差許多,IE 7、8 都無法正常使用排版功能(網格),但其實其他元件都沒什麼問題。
requirejs.config({
name: "main",
shim: {
"foundation/jquery.cookie": { deps: ["jquery"] },
"foundation/jquery.event.move": { deps: ["jquery"] },
"foundation/jquery.event.swipe": { deps: ["jquery"] },
"foundation/jquery.foundation.accordion": { deps: ["jquery", "Modernizr"] },
"foundation/jquery.foundation.alerts": { deps: ["jquery"] },
"foundation/jquery.foundation.buttons": { deps: ["jquery"] },
@wastemobile
wastemobile / README.md
Created September 3, 2013 15:08 — forked from mhayes/README.md

Enabling noConflict mode

Using a default Foundation download you'll see some code like this:

<script>
document.write('<script src=' +
('__proto__' in {} ? 'js/vendor/zepto' : 'js/vendor/jquery') +
'.js><\/script>')

Susy Tutorial

For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.

There is also reference documentation in the works.

What Susy Does

CSS Systems

  • Draft Number: 1
  • Date: 2013-04-14
  • Author: John Porter @designermonkey

Symphony Next

This is all still a little new to me, so forgive me if this sounds naive, or you all have already thought about this and it's obvious, but I've been thinking about how we actually build Next. (I like this as a project codename).

Proposing the Application

@wastemobile
wastemobile / mountain-lion-brew-setup.markdown
Created December 10, 2012 15:31 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

讓山獅(Mountain Lion)與 Homebrew 快樂並存

1) 安裝 XCode(目前版本 4.5.2)在 /Applications

從 Mac App Store 免費下載安裝。

2) 安裝命令列工具(Command Line Tools)

在 XCode 的 Preferences > Downloads 可以選擇安裝 command line tools。

@wastemobile
wastemobile / MIT-LICENSE.txt
Created November 29, 2012 07:11 — forked from jgarber/MIT-LICENSE.txt
Responsive video
Copyright (c) 2011 ZURB, http://www.zurb.com/
@wastemobile
wastemobile / prepareImportValue.md
Created August 18, 2012 09:05 — forked from brendo/prepareImportValue.md
Introducing the XML Importer's prepareImportValue function

Introducing the XML Importer's prepareImportValue function

The XML Importer extension is widely used to help users import XML content into their Symphony sections. Developers enter a URL that returns XML and then write XPath to map values to their corresponding fields, but sometimes this results in a field not receiving a value, an incorrect value, or the XML Importer failing to import anything.

While not always the case, sometimes the XPath could be wrong, namespaces weren't added or you've discovered a bug (log it, but it can also be because a Field doesn't know how take the value you've given it and save it. This short article will explain how you can ensure that your field is compatible with the XML Importer, thanks to the prepareImportValue function.

Why is it needed?

Fields in Symphony have two existing function's, checkPostFieldData and [processRawFieldData]

@wastemobile
wastemobile / EventTutorial.md
Created August 18, 2012 06:31 — forked from brendo/EventTutorial.md
Symphony Events: A Detailed Look

表單(Forms)是網站互動最基本的元件,使用者填表後送出(submit),主機會進行一些動作(action),儲存了資料,並將結果呈現給使用者。 Symphony CMS 提供了事件(Events)這個功能來進行表單處理。

這份教學假設您已經熟悉 Symphony CMS 的使用 (萬一不是, 這裡有對 Symphony CMS 最基本的介紹) ,而且還要能夠寫一點 PHP 程式碼。教學中觸及 Symphony CMS Events 比較少被人談到的進階功能,包含了事件的優先權、事件的串接,也談到一點點如何寫一個自製的事件。

開始

劇本概觀

我們的客戶需要讓用戶提交他們剛買的新車,主要是提供新車的資料,但也需要紀錄從哪裡買到這輛車的資訊。因此這份表單必須一次更新 Symphony 的兩個內容表(Sections):車,與經銷商。