This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| echo "ZFS listing:" | |
| /sbin/zfs list | |
| echo | |
| echo "ZFS compression ratio:" | |
| /sbin/zfs get compressratio | /usr/bin/grep -v @ | |
| echo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MyApp.myPopoverView = SC.PickerPane.create({ | |
| layout: { width: 300, height: 150 }, | |
| themeName: 'popover', | |
| contentView: SC.WorkspaceView.extend({ | |
| topToolbar: null, | |
| bottomToolbar: null, | |
| contentView: SC.View.extend({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // in apps/your_app/core.js, add: require('ext/binding'); | |
| // place this in apps/your_app/ext/binding.js: | |
| SC.mixin(SC.Binding, { | |
| firstObject: function() { | |
| return this.transform(function(value, isForward) { | |
| if (value && value.isEnumerable) { | |
| value = value.firstObject(); | |
| } | |
| return value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This example shows how to use SC.StackedView with complex items. | |
| The item view (List.ItemView) must use SC.StaticLayout mixin and | |
| set useStaticLayout to YES -- that's a requirement of SC.StackedView. | |
| Note that children views of List.ItemView also need to add SC.StaticLayout | |
| and set useStaticLayout to YES. This setting doesn't preclude positioning | |
| of child views within its block, by using layout's "left", "width" | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // jQuery.support.transition | |
| // to verify that CSS3 transition is supported (or any of its browser-specific implementations) | |
| $.support.transition = (function(){ | |
| var thisBody = document.body || document.documentElement, | |
| thisStyle = thisBody.style, | |
| support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined; | |
| return support; | |
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| nameValue: SC.LabelView.design({ | |
| layout: { | |
| top: 30, | |
| left: 125, | |
| height: 24, | |
| width: 200 | |
| }, | |
| valueBinding: "Training.operativesController.selection", | |
| valueBindingDefault: SC.Binding.single() // when bindings are formed, it will use single() binding, which gets first object |
NewerOlder