Update system packages -- will migrate system forward to CentOS 5.8. (Optional?)
$ sudo yum update
Install the EPEL Repo:
window.App = Ember.Application.create() | |
App.Focusable = Ember.Mixin.create | |
# Don't let events spoil your Kool-Aid! | |
# Let's get these out of the way by turning them | |
# into a magical property: | |
focused: false | |
focusIn: (event) -> @set 'focused', true | |
focusOut: (event) -> @set 'focused', false |
function cloneFromView(obj) { | |
if (null == obj || "object" != typeof obj) return obj; | |
var copy = Ember.View.create({ | |
templateName: obj.templateName | |
}); | |
for (var attr in obj) { | |
if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr]; | |
} | |
return copy; | |
} |
{{view M.Select | |
contentBinding="Desires.elementTypeController" | |
valueBinding="this.type" | |
optionLabelPath="content.label" | |
optionValuePath="content.type" | |
classNames="input-xlarge" | |
}} | |
M.Select = Em.Select.extend({ |
<?php | |
$fileName = $_FILES['afile']['name']; | |
$fileType = $_FILES['afile']['type']; | |
$fileContent = file_get_contents($_FILES['afile']['tmp_name']); | |
$dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent); | |
$json = json_encode(array( | |
'name' => $fileName, | |
'type' => $fileType, | |
'dataUrl' => $dataUrl, |
<?php | |
/** | |
* Action Helper | |
* Allows to generate simple CRUD links for a given object and customize its rendering | |
* It only works for default baked urls | |
* | |
* Usage: | |
* <code> | |
* $this->Actions->setActionsOptions($order['Order']['id'], true); | |
* echo $this->Actions->view(); |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
App = Ember.Application.create(); | |
App.store = DS.Store.create({ | |
adapter: DS.RESTAdapter.create() | |
}) | |
App.set("room_id", 1); | |
App.Models = Ember.Namespace.create(); |
/* | |
* RC4 symmetric cipher encryption/decryption | |
* | |
* @license Public Domain | |
* @param string key - secret key for encryption/decryption | |
* @param string str - string to be encrypted/decrypted | |
* @return string | |
*/ | |
function rc4(key, str) { | |
var s = [], j = 0, x, res = ''; |
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |